I am thinking about writing a little program to show processes that
use swap.
For this I will get name and amount of swap of every process that uses
swap.
I want to show them with biggest swap first. When the same amount is
used it should be sorted on name.
What would be the best data-structure for this?
* Cecil Westerhof <Cecil@decebal.nl>
| I am thinking about writing a little program to show processes that
| use swap.
| For this I will get name and amount of swap of every process that uses
| swap.
| I want to show them with biggest swap first. When the same amount is
| used it should be sorted on name.
| What would be the best data-structure for this?
A list with {name size} elements. Since lsort has stable sort, you
first sort on name (lsort -index 0), then on size (lsort -index 1).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 493 |
Nodes: | 16 (2 / 14) |
Uptime: | 180:44:24 |
Calls: | 9,705 |
Files: | 13,737 |
Messages: | 6,179,422 |