Saturday, August 11, 2007

been playing with linux system accounting

One day I play around on my laptop, which I found the acct utilities, which I wonder when I install. Anyway, later I found out what it is. Actually it is a unix system accounting. Which contain a few utilities, such as:
- sa
- ac
- lastcomm

So play around I did. So I start with sa. Which I get a set of statistics of io, memory and cpu usage.

7924 800.15re 18.51cp 0avio 2835k
55 262.28re 17.77cp 0avio 2848k ***other*
46 53.41re 0.30cp 0avio 8430k gdl_indexer
47 1.55re 0.16cp 0avio 2079k apport
21 0.32re 0.13cp 0avio 6228k mono
46 0.68re 0.08cp 0avio 8430k gdl_indexer*
29 0.12re 0.02cp 0avio 478k gzip
2619 1.12re 0.01cp 0avio 514k file
2 0.04re 0.01cp 0avio 936k vrms
4 0.57re 0.00cp 0avio 2317k apache2
10 0.30re 0.00cp 0avio 704k dhclient-script
11 50.67re 0.00cp 0avio 0k pdflush*
12 0.11re 0.00cp 0avio 573k gpgv
2 0.01re 0.00cp 0avio 4346k kde-config
2 0.01re 0.00cp 0avio 1210k troff
----output truncated--------

which not really sorted. So later i found out a parameter for sa, --sort-cpu-avmem

8484 804.23re 18.61cp 0avio 2808k
7 0.20re 0.00cp 0avio 28526k pidgin*
922 0.01re 0.00cp 0avio 19963k beagled-helper*
26 0.12re 0.04cp 0avio 19648k totem-video-ind
49 57.01re 0.33cp 0avio 8457k gdl_indexer
49 0.69re 0.08cp 0avio 8457k gdl_indexer*
6 374.57re 0.00cp 0avio 6753k apache2*
21 0.32re 0.13cp 0avio 6228k mono
2 0.01re 0.00cp 0avio 4346k kde-config
56 262.28re 17.78cp 0avio 2793k ***other*
10 0.10re 0.00cp 0avio 2374k smbd*
4 0.57re 0.00cp 0avio 2317k apache2
----output truncated--------
which interesting because, pidgin take 28meg of memory, or i read wrong. most of the time I get firefox using 50meg.

another interesting command is lastcomm. which display the last command executed.

-----above line deleted------------
find root ?? 0.00 secs Sun Aug 12 09:07
xargs root ?? 0.00 secs Sun Aug 12 09:07
rm root ?? 0.00 secs Sun Aug 12 09:07
find root ?? 0.00 secs Sun Aug 12 09:07
acct root ?? 0.00 secs Sun Aug 12 09:07
acct root ?? 0.00 secs Sun Aug 12 09:07
acct root ?? 0.00 secs Sun Aug 12 09:07
accton S root ?? 0.00 secs Sun Aug 12 09:07
which I didn't fully explore yet. lastly is the ca utility. which can display the amount of time a user log in to the system, for a week.

which all of this is new to actually.

No comments:

Post a Comment