archive-com.com » COM » O » ORCAWARE.COM

Total: 284

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • n fprintf stderr setenv GATEWAY some where com special address to monitor n fprintf stderr setenv OUTDIR ns home docs orcallator logs default stdout n fprintf stderr setenv SEARCHURL srch cgi match for search scripts default is search cgi n fprintf stderr Defines n fprintf stderr DWATCH WEB watch web server access logs n fprintf stderr DWATCH PROXY use WEB LOG as a NCSA style proxy log n fprintf stderr DWATCH SQUID use WEB LOG as a Squid log n fprintf stderr DWATCH OS includes all of the below n fprintf stderr DWATCH CPU watch the cpu load run queue etc n fprintf stderr DWATCH MUTEX watch the number of mutex spins n fprintf stderr DWATCH NET watch all Ethernet interfaces n fprintf stderr DWATCH TCP watch all the TCP IP stack n fprintf stderr DWATCH NFS watch NFS requests n fprintf stderr DWATCH MOUNTS watch usage of mount points n fprintf stderr DWATCH DISK watch disk read write usage n fprintf stderr DWATCH DNLC watch the directory name lookup cache n fprintf stderr DWATCH INODE watch the inode cache n fprintf stderr DWATCH RAM watch memory usage n fprintf stderr DWATCH PAGES watch where pages are allocated n exit 1 break Initialize the various structures initialize Run forever If WATCH WEB is defined then have measure web do the sleeping while it is watching the access log file until the next update time for the whole operating system Also collect the data from the access log file before printing any output for Calculate the next time to sleep to that is an integer multiple of the interval time Make sure that at least half of the interval passes before waking up now time 0 sleep till now interval interval while sleep till mpid5 previous mpid5 diff mpid5 current mpid5 previous else mpid5 diff mpid5 current DEFAULT MAXPID mpid5 previous rate mpid5 diff mpid5 interval if rate mpid5 rate mpid5 rate rate mpid5 previous mpid5 current Now take these results to measure the long interval rate Because the mpid may flip over DEFAULT MAXPID more than once in the long interval time span use the difference between the previous and current mpid over a 5 second interval to calculate the long interval difference mpid current mpid5 diff mpid now mpid5 now else sleep sleep till now else sleep sleep till now endif now time 0 ifdef WATCH CPU measure cpu p vmstat pvm double mpid interval double mpid rate pvm vmglobal total In SE 3 0 user time and system time are int and in SE 3 1 they are double so cast everything to double using 0 0 put output usr sprintf 5 1f pvm user time 0 0 put output sys sprintf 5 1f pvm system time 0 0 put output 1runq sprintf 6 2f tmp kstat misc avenrun 1min 256 0 put output 5runq sprintf 6 2f tmp kstat misc avenrun 5min 256 0 put output 15runq sprintf 6 2f tmp kstat misc avenrun 15min 256 0

    Original URL path: https://www.orcaware.com/orca/pub/orcallator.se-1.15.txt (2016-04-24)
    Open archived version from archive



  • atoi argv 1 break default fprintf stderr usage se Defines s interval n program name fprintf stderr s can use the following environmental variables n program name fprintf stderr setenv OUTDIR var orcallator logs log file directory default stdout n fprintf stderr setenv WEB SERVER apache string to search for number of web servers n fprintf stderr setenv WEB LOG ns home httpd 80 logs access location of web server log n fprintf stderr setenv GATEWAY some where com special address to monitor n fprintf stderr setenv SEARCHURL srch cgi match for search scripts default is search cgi n fprintf stderr setenv COMPRESSOR gzip 9 compress previous day logs using this command n fprintf stderr Defines n fprintf stderr DWATCH WEB watch web server access logs n fprintf stderr DWATCH PROXY use WEB LOG as a NCSA style proxy log n fprintf stderr DWATCH SQUID use WEB LOG as a Squid log n fprintf stderr DWATCH OS includes all of the below n fprintf stderr DWATCH CPU watch the cpu load run queue etc n fprintf stderr DWATCH MUTEX watch the number of mutex spins n fprintf stderr DWATCH NET watch all Ethernet interfaces n fprintf stderr DWATCH TCP watch all the TCP IP stack n fprintf stderr DWATCH NFS watch NFS requests n fprintf stderr DWATCH MOUNTS watch usage of mount points n fprintf stderr DWATCH DISK watch disk read write usage n fprintf stderr DWATCH DNLC watch the directory name lookup cache n fprintf stderr DWATCH INODE watch the inode cache n fprintf stderr DWATCH RAM watch memory usage n fprintf stderr DWATCH PAGES watch where pages are allocated n exit 1 break Initialize the various structures initialize Run forever If WATCH WEB is defined then have measure web do the sleeping while it is watching the access log file until the next update time for the whole operating system Also collect the data from the access log file before printing any output for Calculate the next time to sleep to that is an integer multiple of the interval time Make sure that at least half of the interval passes before waking up now time 0 sleep till now interval interval while sleep till mpid5 previous mpid5 diff mpid5 current mpid5 previous else mpid5 diff mpid5 current DEFAULT MAXPID mpid5 previous rate mpid5 diff mpid5 interval if rate mpid5 rate mpid5 rate rate mpid5 previous mpid5 current Now take these results to measure the long interval rate Because the mpid may flip over DEFAULT MAXPID more than once in the long interval time span use the difference between the previous and current mpid over a 5 second interval to calculate the long interval difference mpid current mpid5 diff mpid now mpid5 now else sleep sleep till now else sleep sleep till now endif now time 0 ifdef WATCH CPU measure cpu p vmstat pvm double mpid interval double mpid rate pvm vmglobal total In SE 3 0 user time and system time are int and in SE 3

    Original URL path: https://www.orcaware.com/orca/pub/orcallator.se-1.16.txt (2016-04-24)
    Open archived version from archive


  • arguments switch argc case 1 break case 2 interval atoi argv 1 break default fprintf stderr usage se Defines s interval n program name fprintf stderr s can use the following environmental variables n program name fprintf stderr setenv OUTDIR var orcallator logs log file directory default stdout n fprintf stderr setenv WEB SERVER apache string to search for number of web servers n fprintf stderr setenv WEB LOG ns home httpd 80 logs access location of web server log n fprintf stderr setenv GATEWAY some where com special address to monitor n fprintf stderr setenv SEARCHURL srch cgi match for search scripts default is search cgi n fprintf stderr setenv COMPRESSOR gzip 9 compress previous day logs using this command n fprintf stderr Defines n fprintf stderr DWATCH WEB watch web server access logs n fprintf stderr DWATCH PROXY use WEB LOG as a NCSA style proxy log n fprintf stderr DWATCH SQUID use WEB LOG as a Squid log n fprintf stderr DWATCH OS includes all of the below n fprintf stderr DWATCH CPU watch the cpu load run queue etc n fprintf stderr DWATCH MUTEX watch the number of mutex spins n fprintf stderr DWATCH NET watch all Ethernet interfaces n fprintf stderr DWATCH TCP watch all the TCP IP stack n fprintf stderr DWATCH NFS watch NFS requests n fprintf stderr DWATCH MOUNTS watch usage of mount points n fprintf stderr DWATCH DISK watch disk read write usage n fprintf stderr DWATCH DNLC watch the directory name lookup cache n fprintf stderr DWATCH INODE watch the inode cache n fprintf stderr DWATCH RAM watch memory usage n fprintf stderr DWATCH PAGES watch where pages are allocated n exit 1 break Initialize the various structures initialize Run forever If WATCH WEB is defined then have measure web do the sleeping while it is watching the access log file until the next update time for the whole operating system Also collect the data from the access log file before printing any output for Calculate the next time to sleep to that is an integer multiple of the interval time Make sure that at least half of the interval passes before waking up now time 0 sleep till now interval interval while sleep till mpid5 previous mpid5 diff mpid5 current mpid5 previous else mpid5 diff mpid5 current DEFAULT MAXPID mpid5 previous rate mpid5 diff mpid5 interval if rate mpid5 rate mpid5 rate rate mpid5 previous mpid5 current Now take these results to measure the long interval rate Because the mpid may flip over DEFAULT MAXPID more than once in the long interval time span use the difference between the previous and current mpid over a 5 second interval to calculate the long interval difference mpid current mpid5 diff mpid now mpid5 now else sleep sleep till now else sleep sleep till now endif now time 0 ifdef WATCH CPU measure cpu p vmstat pvm double mpid interval double mpid rate pvm vmglobal total In SE 3 0 user time

    Original URL path: https://www.orcaware.com/orca/pub/orcallator.se-1.17.txt (2016-04-24)
    Open archived version from archive


  • u 0 nodename program name argv 0 Handle the command line arguments switch argc case 1 break case 2 interval atoi argv 1 break default fprintf stderr usage se Defines s interval n program name fprintf stderr s can use the following environmental variables n program name fprintf stderr setenv OUTDIR var orcallator logs log file directory default stdout n fprintf stderr setenv WEB SERVER apache string to search for number of web servers n fprintf stderr setenv WEB LOG ns home httpd 80 logs access location of web server log n fprintf stderr setenv GATEWAY some where com special address to monitor n fprintf stderr setenv SEARCHURL srch cgi match for search scripts default is search cgi n fprintf stderr setenv COMPRESSOR gzip 9 compress previous day logs using this command n fprintf stderr Defines n fprintf stderr DWATCH WEB watch web server access logs n fprintf stderr DWATCH PROXY use WEB LOG as a NCSA style proxy log n fprintf stderr DWATCH SQUID use WEB LOG as a Squid log n fprintf stderr DWATCH OS includes all of the below n fprintf stderr DWATCH CPU watch the cpu load run queue etc n fprintf stderr DWATCH MUTEX watch the number of mutex spins n fprintf stderr DWATCH NET watch all Ethernet interfaces n fprintf stderr DWATCH TCP watch all the TCP IP stack n fprintf stderr DWATCH NFS watch NFS requests n fprintf stderr DWATCH MOUNTS watch usage of mount points n fprintf stderr DWATCH DISK watch disk read write usage n fprintf stderr DWATCH DNLC watch the directory name lookup cache n fprintf stderr DWATCH INODE watch the inode cache n fprintf stderr DWATCH RAM watch memory usage n fprintf stderr DWATCH PAGES watch where pages are allocated n exit 1 break Initialize the various structures initialize Run forever If WATCH WEB is defined then have measure web do the sleeping while it is watching the access log file until the next update time for the whole operating system Also collect the data from the access log file before printing any output for Calculate the next time to sleep to that is an integer multiple of the interval time Make sure that at least half of the interval passes before waking up now time 0 sleep till now interval interval while sleep till mpid5 previous mpid5 diff mpid5 current mpid5 previous else mpid5 diff mpid5 current DEFAULT MAXPID mpid5 previous rate mpid5 diff mpid5 interval if rate mpid5 rate mpid5 rate rate mpid5 previous mpid5 current Now take these results to measure the long interval rate Because the mpid may flip over DEFAULT MAXPID more than once in the long interval time span use the difference between the previous and current mpid over a 5 second interval to calculate the long interval difference mpid current mpid5 diff mpid now mpid5 now else sleep sleep till now else sleep sleep till now endif now time 0 ifdef WATCH CPU measure cpu p vmstat pvm double mpid interval double

    Original URL path: https://www.orcaware.com/orca/pub/orcallator.se-1.18.txt (2016-04-24)
    Open archived version from archive


  • MAX COLUMNS fprintf stderr s too many columns d Increase MAX COLUMNS n program name current column exit 1 col comment current column comment col data current column data current column flush output if print header 0 print columns col comment print header 0 print columns col data current column 0 Sets ofile to the output file pointer Creates or appends to the log file if OUTDIR is set otherwise sets the file pointer to STDOUT It start a new log file each day It compresses the previous days log file if the environmental variable COMPRESSOR is set checkoutput tm t now string outdir getenv OUTDIR string outname tm t then char tm buf 32 if outdir nil No output dir so use stdout if ofile 0 First time so print header and set ofile ofile stdout print header 1 return Maintain daily output logfiles in OUTDIR if now tm yday then tm yday First time or day has changed start new logfile if ofile 0 Close and optionally compress the existing output file fclose ofile if compress nil system sprintf compress outname strftime tm buf sizeof tm buf Y m d now outname sprintf s percol s outdir tm buf Open for append either way ofile fopen outname a if ofile 0 perror can t open output logfile exit 1 Always write header print header 1 then now int main int argc string argv utsname t u 1 long now long sleep till Time to sleep to tm t tm now Get the nodename of the machine uname u nodename u 0 nodename program name argv 0 Handle the command line arguments switch argc case 1 break case 2 interval atoi argv 1 break default fprintf stderr usage se Defines s interval n program name fprintf stderr s can use the following environmental variables n program name fprintf stderr setenv OUTDIR var orcallator logs log file directory default stdout n fprintf stderr setenv WEB SERVER apache string to search for number of web servers n fprintf stderr setenv WEB LOG ns home httpd 80 logs access location of web server log n fprintf stderr setenv GATEWAY some where com special address to monitor n fprintf stderr setenv SEARCHURL srch cgi match for search scripts default is search cgi n fprintf stderr setenv COMPRESSOR gzip 9 compress previous day logs using this command n fprintf stderr Defines n fprintf stderr DWATCH WEB watch web server access logs n fprintf stderr DWATCH PROXY use WEB LOG as a NCSA style proxy log n fprintf stderr DWATCH SQUID use WEB LOG as a Squid log n fprintf stderr DWATCH OS includes all of the below n fprintf stderr DWATCH CPU watch the cpu load run queue etc n fprintf stderr DWATCH MUTEX watch the number of mutex spins n fprintf stderr DWATCH NET watch all Ethernet interfaces n fprintf stderr DWATCH TCP watch all the TCP IP stack n fprintf stderr DWATCH NFS watch NFS requests n fprintf stderr DWATCH MOUNTS watch usage of mount points n fprintf stderr DWATCH DISK watch disk read write usage n fprintf stderr DWATCH DNLC watch the directory name lookup cache n fprintf stderr DWATCH INODE watch the inode cache n fprintf stderr DWATCH RAM watch memory usage n fprintf stderr DWATCH PAGES watch where pages are allocated n exit 1 break Initialize the various structures initialize Run forever If WATCH WEB is defined then have measure web do the sleeping while it is watching the access log file until the next update time for the whole operating system Also collect the data from the access log file before printing any output for Calculate the next time to sleep to that is an integer multiple of the interval time Make sure that at least half of the interval passes before waking up now time 0 sleep till now interval interval while sleep till mpid5 previous mpid5 diff mpid5 current mpid5 previous else mpid5 diff mpid5 current DEFAULT MAXPID mpid5 previous rate mpid5 diff mpid5 interval if rate mpid5 rate mpid5 rate rate mpid5 previous mpid5 current Now take these results to measure the long interval rate Because the mpid may flip over DEFAULT MAXPID more than once in the long interval time span use the difference between the previous and current mpid over a 5 second interval to calculate the long interval difference mpid current mpid5 diff mpid now mpid5 now else sleep sleep till now else sleep sleep till now endif now time 0 ifdef WATCH CPU measure cpu p vmstat pvm double mpid interval double mpid rate pvm vmglobal total In SE 3 0 user time and system time are int and in SE 3 1 they are double so cast everything to double using 0 0 put output usr sprintf 5 1f pvm user time 0 0 put output sys sprintf 5 1f pvm system time 0 0 put output 1runq sprintf 6 2f tmp kstat misc avenrun 1min 256 0 put output 5runq sprintf 6 2f tmp kstat misc avenrun 5min 256 0 put output 15runq sprintf 6 2f tmp kstat misc avenrun 15min 256 0 put output proc sprintf 5lu tmp kstat misc nproc put output scanrate sprintf 8 3f pvm scan Calculate the rate of new process spawning if can read kernel 0 mpid interval mpid now mpid then 0 000000001 mpid rate mpid current mpid previous mpid interval put output proc s sprintf 7 3f mpid rate put output proc p5s sprintf 9 4f mpid5 rate Reset counters mpid then mpid now mpid previous mpid current mpid5 rate 0 endif ifdef WATCH MUTEX measure mutex put output smtx sprintf 5d tmp mutex smtx put output smtx cpu sprintf 8d tmp mutex smtx tmp mutex ncpus put output ncpus sprintf 5d tmp mutex ncpus endif ifdef WATCH NET measure net int previous count 1 int current count int i current count 0 for i 0 i peak disk busy peak disk busy GLOBAL disk i run percent if GLOBAL disk

    Original URL path: https://www.orcaware.com/orca/pub/orcallator.se-1.19.txt (2016-04-24)
    Open archived version from archive


  • i for i 0 i MAX COLUMNS fprintf stderr s too many columns d Increase MAX COLUMNS n program name current column exit 1 col comment current column comment col data current column data current column flush output if print header 0 print columns col comment print header 0 print columns col data current column 0 Sets ofile to the output file pointer Creates or appends to the log file if OUTDIR is set otherwise sets the file pointer to STDOUT It start a new log file each day It compresses the previous days log file if the environmental variable COMPRESSOR is set checkoutput tm t now string outdir getenv OUTDIR string outname tm t then char tm buf 32 if outdir nil No output dir so use stdout if ofile 0 First time so print header and set ofile ofile stdout print header 1 return Maintain daily output logfiles in OUTDIR if now tm yday then tm yday First time or day has changed start new logfile if ofile 0 Close and optionally compress the existing output file fclose ofile if compress nil system sprintf compress outname strftime tm buf sizeof tm buf Y m d now outname sprintf s percol s outdir tm buf Open for append either way ofile fopen outname a if ofile 0 perror can t open output logfile exit 1 Always write header print header 1 then now int main int argc string argv utsname t u 1 long now long sleep till Time to sleep to tm t tm now Get the nodename of the machine uname u nodename u 0 nodename program name argv 0 Handle the command line arguments switch argc case 1 break case 2 interval atoi argv 1 break default fprintf stderr usage se Defines s interval n program name fprintf stderr s can use the following environmental variables n program name fprintf stderr setenv OUTDIR var orcallator logs log file directory default stdout n fprintf stderr setenv WEB SERVER apache string to search for number of web servers n fprintf stderr setenv WEB LOG ns home httpd 80 logs access location of web server log n fprintf stderr setenv GATEWAY some where com special address to monitor n fprintf stderr setenv SEARCHURL srch cgi match for search scripts default is search cgi n fprintf stderr setenv COMPRESSOR gzip 9 compress previous day logs using this command n fprintf stderr Defines n fprintf stderr DWATCH WEB watch web server access logs n fprintf stderr DWATCH PROXY use WEB LOG as a NCSA style proxy log n fprintf stderr DWATCH SQUID use WEB LOG as a Squid log n fprintf stderr DWATCH OS includes all of the below n fprintf stderr DWATCH CPU watch the cpu load run queue etc n fprintf stderr DWATCH MUTEX watch the number of mutex spins n fprintf stderr DWATCH NET watch all Ethernet interfaces n fprintf stderr DWATCH TCP watch all the TCP IP stack n fprintf stderr DWATCH NFS watch NFS requests n fprintf stderr DWATCH MOUNTS watch usage of mount points n fprintf stderr DWATCH DISK watch disk read write usage n fprintf stderr DWATCH DNLC watch the directory name lookup cache n fprintf stderr DWATCH INODE watch the inode cache n fprintf stderr DWATCH RAM watch memory usage n fprintf stderr DWATCH PAGES watch where pages are allocated n exit 1 break Initialize the various structures initialize Run forever If WATCH WEB is defined then have measure web do the sleeping while it is watching the access log file until the next update time for the whole operating system Also collect the data from the access log file before printing any output for Calculate the next time to sleep to that is an integer multiple of the interval time Make sure that at least half of the interval passes before waking up now time 0 sleep till now interval interval while sleep till mpid5 previous mpid5 diff mpid5 current mpid5 previous else mpid5 diff mpid5 current DEFAULT MAXPID mpid5 previous rate mpid5 diff mpid5 interval if rate mpid5 rate mpid5 rate rate mpid5 previous mpid5 current Now take these results to measure the long interval rate Because the mpid may flip over DEFAULT MAXPID more than once in the long interval time span use the difference between the previous and current mpid over a 5 second interval to calculate the long interval difference mpid current mpid5 diff mpid now mpid5 now else sleep sleep till now else sleep sleep till now endif now time 0 ifdef WATCH CPU measure cpu p vmstat pvm double mpid interval double mpid rate pvm vmglobal total In SE 3 0 user time and system time are int and in SE 3 1 they are double so cast everything to double using 0 0 put output usr sprintf 5 1f pvm user time 0 0 put output sys sprintf 5 1f pvm system time 0 0 put output 1runq sprintf 6 2f tmp kstat misc avenrun 1min 256 0 put output 5runq sprintf 6 2f tmp kstat misc avenrun 5min 256 0 put output 15runq sprintf 6 2f tmp kstat misc avenrun 15min 256 0 put output proc sprintf 5lu tmp kstat misc nproc put output scanrate sprintf 8 3f pvm scan Calculate the rate of new process spawning if can read kernel 0 mpid interval mpid now mpid then 0 000000001 mpid rate mpid current mpid previous mpid interval put output proc s sprintf 7 3f mpid rate put output proc p5s sprintf 9 4f mpid5 rate Reset counters mpid then mpid now mpid previous mpid current mpid5 rate 0 endif ifdef WATCH MUTEX measure mutex put output smtx sprintf 5d tmp mutex smtx put output smtx cpu sprintf 8d tmp mutex smtx tmp mutex ncpus put output ncpus sprintf 5d tmp mutex ncpus endif ifdef WATCH NET measure net int previous count 1 int current count int i current count 0 for i 0 i peak disk busy peak disk busy GLOBAL disk i

    Original URL path: https://www.orcaware.com/orca/pub/orcallator.se-1.20.txt (2016-04-24)
    Open archived version from archive


  • Comments for each column string col data MAX COLUMNS Data for each column int current column 0 The current column int print header 1 Flag to flush header Send the stored columns of information to the output print columns string data int i for i 0 i MAX COLUMNS fprintf stderr s too many columns d Increase MAX COLUMNS n program name current column exit 1 col comment current column comment col data current column data current column flush output if print header 0 print columns col comment print header 0 print columns col data current column 0 Sets ofile to the output file pointer Creates or appends to the log file if OUTDIR is set otherwise sets the file pointer to STDOUT It start a new log file each day It compresses the previous days log file if the environmental variable COMPRESSOR is set checkoutput tm t now string outdir getenv OUTDIR string outname tm t then char tm buf 32 if outdir nil No output dir so use stdout if ofile 0 First time so print header and set ofile ofile stdout print header 1 return Maintain daily output logfiles in OUTDIR if now tm yday then tm yday First time or day has changed start new logfile if ofile 0 Close and optionally compress the existing output file fclose ofile if compress nil system sprintf compress outname strftime tm buf sizeof tm buf Y m d now outname sprintf s percol s outdir tm buf Open for append either way ofile fopen outname a if ofile 0 perror can t open output logfile exit 1 Always write header print header 1 then now int main int argc string argv utsname t u 1 long now long sleep till Time to sleep to tm t tm now Get the nodename of the machine uname u nodename u 0 nodename program name argv 0 Handle the command line arguments switch argc case 1 break case 2 interval atoi argv 1 break default fprintf stderr usage se Defines s interval n program name fprintf stderr s can use the following environmental variables n program name fprintf stderr setenv OUTDIR var orcallator logs log file directory default stdout n fprintf stderr setenv WEB SERVER apache string to search for number of web servers n fprintf stderr setenv WEB LOG ns home httpd 80 logs access location of web server log n fprintf stderr setenv GATEWAY some where com special address to monitor n fprintf stderr setenv SEARCHURL srch cgi match for search scripts default is search cgi n fprintf stderr setenv COMPRESSOR gzip 9 compress previous day logs using this command n fprintf stderr Defines n fprintf stderr DWATCH WEB watch web server access logs n fprintf stderr DWATCH PROXY use WEB LOG as a NCSA style proxy log n fprintf stderr DWATCH SQUID use WEB LOG as a Squid log n fprintf stderr DWATCH OS includes all of the below n fprintf stderr DWATCH CPU watch the cpu load run queue etc n fprintf stderr DWATCH MUTEX watch the number of mutex spins n fprintf stderr DWATCH NET watch all Ethernet interfaces n fprintf stderr DWATCH TCP watch all the TCP IP stack n fprintf stderr DWATCH NFS CLIENT watch NFS client requests n fprintf stderr DWATCH NFS SERVER watch NFS server requests n fprintf stderr DWATCH MOUNTS watch usage of mount points n fprintf stderr DWATCH DISK watch disk read write usage n fprintf stderr DWATCH DNLC watch the directory name lookup cache n fprintf stderr DWATCH INODE watch the inode cache n fprintf stderr DWATCH RAM watch memory usage n fprintf stderr DWATCH PAGES watch where pages are allocated n exit 1 break Initialize the various structures initialize Run forever If WATCH WEB is defined then have measure web do the sleeping while it is watching the access log file until the next update time for the whole operating system Also collect the data from the access log file before printing any output for Calculate the next time to sleep to that is an integer multiple of the interval time Make sure that at least half of the interval passes before waking up now time 0 sleep till now interval interval while sleep till mpid5 previous mpid5 diff mpid5 current mpid5 previous else mpid5 diff mpid5 current DEFAULT MAXPID mpid5 previous rate mpid5 diff mpid5 interval if rate mpid5 rate mpid5 rate rate mpid5 previous mpid5 current Now take these results to measure the long interval rate Because the mpid may flip over DEFAULT MAXPID more than once in the long interval time span use the difference between the previous and current mpid over a 5 second interval to calculate the long interval difference mpid current mpid5 diff mpid now mpid5 now else sleep sleep till now else sleep sleep till now endif now time 0 ifdef WATCH CPU measure cpu p vmstat pvm double mpid interval double mpid rate pvm vmglobal total In SE 3 0 user time and system time are int and in SE 3 1 they are double so cast everything to double using 0 0 put output usr sprintf 5 1f pvm user time 0 0 put output sys sprintf 5 1f pvm system time 0 0 put output 1runq sprintf 6 2f tmp kstat misc avenrun 1min 256 0 put output 5runq sprintf 6 2f tmp kstat misc avenrun 5min 256 0 put output 15runq sprintf 6 2f tmp kstat misc avenrun 15min 256 0 put output proc sprintf 5lu tmp kstat misc nproc put output scanrate sprintf 8 3f pvm scan Calculate the rate of new process spawning if can read kernel 0 mpid interval mpid now mpid then 0 000000001 mpid rate mpid current mpid previous mpid interval put output proc s sprintf 7 3f mpid rate put output proc p5s sprintf 9 4f mpid5 rate Reset counters mpid then mpid now mpid previous mpid current mpid5 rate 0 endif ifdef WATCH MUTEX measure mutex put output smtx sprintf 5d

    Original URL path: https://www.orcaware.com/orca/pub/orcallator.se-1.22.txt (2016-04-24)
    Open archived version from archive


  • squid client http endif endif Variables for handling output string compress getenv COMPRESSOR How to compress logs ulong ofile File pointer to the logging file string col comment MAX COLUMNS Comments for each column string col data MAX COLUMNS Data for each column int current column 0 The current column int print header 1 Flag to flush header Send the stored columns of information to the output print columns string data int i for i 0 i MAX COLUMNS fprintf stderr s too many columns d Increase MAX COLUMNS n program name current column exit 1 col comment current column comment col data current column data current column flush output if print header 0 print columns col comment print header 0 print columns col data current column 0 Sets ofile to the output file pointer Creates or appends to the log file if OUTDIR is set otherwise sets the file pointer to STDOUT It start a new log file each day It compresses the previous days log file if the environmental variable COMPRESSOR is set checkoutput tm t now string outdir getenv OUTDIR string outname tm t then char tm buf 32 if outdir nil No output dir so use stdout if ofile 0 First time so print header and set ofile ofile stdout print header 1 return Maintain daily output logfiles in OUTDIR if now tm yday then tm yday First time or day has changed start new logfile if ofile 0 Close and optionally compress the existing output file fclose ofile if compress nil system sprintf compress outname strftime tm buf sizeof tm buf Y m d now outname sprintf s percol s outdir tm buf Open for append either way ofile fopen outname a if ofile 0 perror can t open output logfile exit 1 Always write header print header 1 then now int main int argc string argv utsname t u 1 long now long sleep till Time to sleep to tm t tm now Get the nodename of the machine uname u nodename u 0 nodename program name argv 0 Handle the command line arguments switch argc case 1 break case 2 interval atoi argv 1 break default fprintf stderr usage se Defines s interval n program name fprintf stderr s can use the following environmental variables n program name fprintf stderr setenv OUTDIR var orcallator logs log file directory default stdout n fprintf stderr setenv WEB SERVER apache string to search for number of web servers n fprintf stderr setenv WEB LOG ns home httpd 80 logs access location of web server log n fprintf stderr setenv GATEWAY some where com special address to monitor n fprintf stderr setenv SEARCHURL srch cgi match for search scripts default is search cgi n fprintf stderr setenv COMPRESSOR gzip 9 compress previous day logs using this command n fprintf stderr Defines n fprintf stderr DWATCH WEB watch web server access logs n fprintf stderr DWATCH PROXY use WEB LOG as a NCSA style proxy log n fprintf stderr DWATCH SQUID use WEB LOG as a Squid log n fprintf stderr DWATCH OS includes all of the below n fprintf stderr DWATCH CPU watch the cpu load run queue etc n fprintf stderr DWATCH MUTEX watch the number of mutex spins n fprintf stderr DWATCH NET watch all Ethernet interfaces n fprintf stderr DWATCH TCP watch all the TCP IP stack n fprintf stderr DWATCH NFS CLIENT watch NFS client requests n fprintf stderr DWATCH NFS SERVER watch NFS server requests n fprintf stderr DWATCH MOUNTS watch usage of mount points n fprintf stderr DWATCH DISK watch disk read write usage n fprintf stderr DWATCH DNLC watch the directory name lookup cache n fprintf stderr DWATCH INODE watch the inode cache n fprintf stderr DWATCH RAM watch memory usage n fprintf stderr DWATCH PAGES watch where pages are allocated n exit 1 break Initialize the various structures initialize Run forever If WATCH WEB is defined then have measure web do the sleeping while it is watching the access log file until the next update time for the whole operating system Also collect the data from the access log file before printing any output for Calculate the next time to sleep to that is an integer multiple of the interval time Make sure that at least half of the interval passes before waking up now time 0 sleep till now interval interval while sleep till mpid5 previous mpid5 diff mpid5 current mpid5 previous else mpid5 diff mpid5 current DEFAULT MAXPID mpid5 previous rate mpid5 diff mpid5 interval if rate mpid5 rate mpid5 rate rate mpid5 previous mpid5 current Now take these results to measure the long interval rate Because the mpid may flip over DEFAULT MAXPID more than once in the long interval time span use the difference between the previous and current mpid over a 5 second interval to calculate the long interval difference mpid current mpid5 diff mpid now mpid5 now else sleep sleep till now else sleep sleep till now endif now time 0 ifdef WATCH CPU measure cpu p vmstat pvm double mpid interval double mpid rate pvm vmglobal total In SE 3 0 user time and system time are int and in SE 3 1 they are double so cast everything to double using 0 0 put output usr sprintf 5 1f pvm user time 0 0 put output sys sprintf 5 1f pvm system time 0 0 put output 1runq sprintf 6 2f tmp kstat misc avenrun 1min 256 0 put output 5runq sprintf 6 2f tmp kstat misc avenrun 5min 256 0 put output 15runq sprintf 6 2f tmp kstat misc avenrun 15min 256 0 put output proc sprintf 5lu tmp kstat misc nproc put output scanrate sprintf 8 3f pvm scan Calculate the rate of new process spawning if can read kernel 0 mpid interval mpid now mpid then 0 000000001 mpid rate mpid current mpid previous mpid interval put output proc s sprintf 7 3f mpid rate put output proc

    Original URL path: https://www.orcaware.com/orca/pub/orcallator.se-1.23.txt (2016-04-24)
    Open archived version from archive



  •