fast access to process list

fast access to process list

Post by Alex Toma » Thu, 26 Dec 2002 23:30:13



Hello!

Look how long is following command on system with 3000 processes.


real    0m10.380s
user    0m5.511s
sys     0m4.870s

Ie, ten ps'es eat 10 secs and system had no active processes at all.

I really don't like it. Therefore, I started to implement own chardev driver
with own tool (I call it 'fast ps'). Look how long it needs:


real    0m0.992s
user    0m0.620s
sys     0m0.372s

Of course, the tool isn't ready yet, but things change ... Here is output of fast ps:


F   UID   PID   PPID  PRI NI  VSIZE RSS   WCHAN  STAT TTY      TIME  COMMAND  
100     0     1     0  29   0  1372   424 do_sel S    ?         0:08 init [5]
040     0     2     1  30   0     0     0 contex S    ?         0:07 keventd  
040     0     3     1  30   0     0     0 apm_ma S    ?         0:00 kapmd    
040     0     4     1  40  19     0     0 ksofti SN   ?         0:03 ksoftirqd
840     0     5     1  30   0     0     0 kswapd S    ?         0:05 kswapd  
040     0     6     1  30   0     0     0 bdflus S    ?         0:00 bdflush  
040     0     7     1  30   0     0     0 kupdat S    ?         0:00 kupdated
040     0    11     1  30   0     0     0 end    S    ?         0:01 kjournald
040     0    90     1  30   0     0     0 end    S    ?         0:00 khubd    
040     0   191     1  30   0     0     0 end    S    ?         0:03 kjournald
040     0   462     1  30   0  1428   492 do_sel S    ?         0:00 syslogd -
140     0   467     1  30   0  1364   428 do_sys S    ?         0:00 klogd -x
140    32   487     1  30   0  1512   452 do_pol S    ?         0:00 portmap  
140     0   517     1  30   0  1696   524 do_pol S    ?         0:00 rpc.mount
140     0   522     1  30   0     0     0 end    S    ?         0:00 nfsd    
140     0   523     1  30   0     0     0 end    S    ?         0:01 nfsd    
040     0   524     1  30   0     0     0 end    S    ?         0:00 lockd    
040     0   525   524  30   0     0     0 end    S    ?         0:00 rpciod  
140     0   636     1  30   0  1488   440 do_sel S    ?         0:00 /sbin/car
140     0   654     1  29   0  1360   412 do_sel S    ?         0:00 /usr/sbin
140     0   723     1  29   0  2620   652 do_sel S    ?         0:00 /usr/sbin
140     0   743     1  30   0  1536   536 nanosl S    ?         0:00 crond    
040     0   761     1  30   0  1404   464 nanosl S    ?         0:00 /usr/sbin
100     0   778     1  30   0  1344   336 read_c S    tty1      0:00 /sbin/min
100     0   779     1  30   0  3212   644 do_sel S    ?         0:00 /usr/X11R
040     0  5499     1  30   0     0     0 end    S    ?         0:00 kjournald
100     0 20899   779  38   0 25260 10052 -      R    ?         8:57 /usr/X11R

At this moment, I have patches against 2.4.20 and 2.5.53. You may find tarball
at http://tmi.comex.ru/fastps.tgz.

I would love to hear any comments/suggestions!

with best regards, Alex

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. fast access to process list

Good day!

I'd like to present 2nd version of fastps.

Changes at kernel side:
  - common codebase for 2.4 and 2.5
  - filters incorporated (ability to select processes to be retreived)
  - possible deadlock removed
  - usage of for_each_task() reduced
  - O(1)-compatibility

Changes in userspace tool fps:
  - ability to select processes to be shown (see fps -h)
  - cleanups in output format
  - fps looks for System.map in several dirs

Patches against 2.4.20/2.5.53 and userspace tool may be found at
http://tmi.comex.ru/fps/

with best regards, Alex

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Is W2K Domain Membership Required for File Sharing from A Linux box?

3. Extended Curses and accessing process list

4. yppasswd doesn't wokr ?

5. list of processes accessing a disk

6. IDE lockup problems (2.4.0-test1 w/ a bp6 motherboard)

7. Access to process list on RS6k

8. 64bit vs. 32bit performance

9. list of processes accessing a disk

10. ACL (access control list) howto list them?

11. How to list all running processes ; How to reparent a process?

12. Swapped Out Processes Look Funny in process list