1*c29d5175SchristosThe following is a demonstration of the pidpersec.d script. 2*c29d5175Schristos 3*c29d5175Schristos 4*c29d5175SchristosHere the program is run on an idle system, 5*c29d5175Schristos 6*c29d5175Schristos # ./pidpersec.d 7*c29d5175Schristos TIME LASTPID PID/s 8*c29d5175Schristos 2005 Jun 9 22:15:09 3010 0 9*c29d5175Schristos 2005 Jun 9 22:15:10 3010 0 10*c29d5175Schristos 2005 Jun 9 22:15:11 3010 0 11*c29d5175Schristos 2005 Jun 9 22:15:12 3010 0 12*c29d5175Schristos 2005 Jun 9 22:15:13 3010 0 13*c29d5175Schristos ^C 14*c29d5175Schristos 15*c29d5175SchristosThis shows that there are now new processes being created. 16*c29d5175Schristos 17*c29d5175Schristos 18*c29d5175Schristos 19*c29d5175SchristosNow the script is run on a busy system, that is creating many processes 20*c29d5175Schristos(which happen to be short-lived), 21*c29d5175Schristos 22*c29d5175Schristos # ./pidpersec.d 23*c29d5175Schristos TIME LASTPID PID/s 24*c29d5175Schristos 2005 Jun 9 22:16:30 3051 13 25*c29d5175Schristos 2005 Jun 9 22:16:31 3063 12 26*c29d5175Schristos 2005 Jun 9 22:16:32 3073 10 27*c29d5175Schristos 2005 Jun 9 22:16:33 3084 11 28*c29d5175Schristos 2005 Jun 9 22:16:34 3096 12 29*c29d5175Schristos ^C 30*c29d5175Schristos 31*c29d5175SchristosNow we can see that there are over 10 new processes created each second. 32*c29d5175SchristosThe value for lastpid confirms the rates printed. 33*c29d5175Schristos 34