Mon, 20 Aug 2007, by [EMAIL PROTECTED]: > I was trying to watch a process to see how a particular application (one I'm > writing in Java) is performing over time. > > In Windows NT (XP/2K/2K3) there is a tool (perfmon) I can use to track system > memory, processor, disk I/O, and other items. I can also write values out to > a log for future analysis. > > I know there is KDE system guard. I've looked and found a nice article from > the now-defunct TuxMagazine (http://www.tuxmagazine.com/node/1000153) but > nothing more interesting. > > What can I use to measure system performance and write it out to some form of > file. I'd like to import the file in a apreadsheet for example.
procinfo maybe? $ procinfo Linux 2.6.22.2-ccj52-default ([EMAIL PROTECTED]) (gcc 4.1.2 20061115) \ #1 SMP 2007/08/09 00:36:21 UTC 1CPU [ferrets4me] Memory: Total Used Free Shared Buffers Mem: 1035928 859852 176076 0 81788 Swap: 530104 164 529940 Bootup: Tue Aug 21 20:05:42 2007 Load average: 1.42 1.57 1.11 1/163 10100 user : 0:11:46.63 7.0% page in : 1008995 disk 1: 49723r 72238w nice : 0:00:34.31 0.3% page out: 1734333 disk 2: 415r 5w system: 0:02:33.78 1.5% page act: 313214 IOwait: 0:04:22.85 2.6% page dea: 152677 [..] Rather easy to parse with awk or python e.g. and write to a spreadsheet. See procinfo -h for more options. Per process you could save /proc/nnnn/status to a file, where 'nnnn' is the id of your program. $ ps ax|grep [vV]im 10094 pts/0 S+ 0:00 vim -c set tw=68 +14 /home/theo/tmp/mutt-ferrets4me-1000-10023-20 $ cat /proc/10094/status Name: vim State: S (sleeping) SleepAVG: 98% Tgid: 10094 Pid: 10094 PPid: 10023 TracerPid: 0 Uid: 1000 1000 1000 1000 Gid: 100 100 100 100 FDSize: 32 Groups: 10 14 16 33 100 1001 VmPeak: 4472 kB VmSize: 4468 kB [..] Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131 SUSE 10.2 + Jabber: [EMAIL PROTECTED] Kernel 2.6.20 + See headers for PGP/GPG info. Claimer: any email I receive will become my property. Disclaimers do not apply. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
