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".

  • of explicitly uncacheable httpops Any extra is errors or incomplete ops endif ifdef WATCH SQUID long squid cache misses long squid icp requests long squid icp queries long 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 0 0 Calculate the rate of new process spawning if can read

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



  • and updates to cache long prxy uncacheable Number of explicitly uncacheable httpops Any extra is errors or incomplete ops endif ifdef WATCH SQUID long squid cache misses long squid icp requests long squid icp queries long 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 0 0 Calculate the

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


  • hits returned from cache endif ifdef WATCH PROXY long prxy cache writes Number of writes and updates to cache long prxy uncacheable Number of explicitly uncacheable httpops Any extra is errors or incomplete ops endif ifdef WATCH SQUID long squid cache misses long squid icp requests long squid icp queries long 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

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


  • long prxy squid cache hits hits returned from cache endif ifdef WATCH PROXY long prxy cache writes Number of writes and updates to cache long prxy uncacheable Number of explicitly uncacheable httpops Any extra is errors or incomplete ops endif ifdef WATCH SQUID long squid cache misses long squid icp requests long squid icp queries long 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 wio sprintf 5 1f pvm wait time 0 0 put output idle sprintf 5 1f pvm idle time 0 0 put output 1runq sprintf 6 2f tmp kstat misc avenrun 1min 256 0 put output 5runq sprintf 6

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


  • hits that go via PROXY SOCKS parent long prxy squid cache hits hits returned from cache endif ifdef WATCH PROXY long prxy cache writes Number of writes and updates to cache long prxy uncacheable Number of explicitly uncacheable httpops Any extra is errors or incomplete ops endif ifdef WATCH SQUID long squid cache misses long squid icp requests long squid icp queries long squid client http endif endif RAWDISK BEGIN ifdef USE RAWDISK include This extension accesses the sys kstat se interface to the kstat IO queues to extract info on drives not available in the kstat se kstat disk interface Global data shared between function calls struct RawDisk Exposed interface matches kstat char long name 16 char short name 8 double reads double kreads double writes double kwrites double avg wait double avg serv double service double wait percent double run percent Hidden internal registers to track sys kstats counters int number kstat disk ulonglong nread Number of bytes read ulonglong nwritten Number of bytes written uint reads Number of read operations uint writes Number of write operations longlong wtime Cumulative wait pre service time longlong wlentime Cumulative wait length time product longlong wlastupdate Last time wait queue changed longlong rtime Cumulative run service time longlong rlentime Cumulative run length time product longlong rlastupdate Last time run queue changed uint wcnt Count of elements in wait state uint rcnt Count of elements in run state Define global for tracking raw disk data define MAX RAWDISKS 512 RawDisk RAW disk MAX RAWDISKS int RAW disk map 0 int RAW disk count 0 double RAW disk lastupdate Function to scan kstat and map short device names to long device names raw disk map int i int j 0 char long name 16 char short name 16 SE for 2 6 2 7 appears to have a bug where MAX DISK is too large when an A1000 raid controller is present It s not really SE as iostat had to be patched for the same bug The bug appears to be tied to a failure to update the kstat interface diskinfo uses to map short names to long names Since raw disk update has already identified how many physical devices are present and they are listed first we limit our self to mapping the first RAW disk count device name for i 0 i nread nread RAW disk rdisk nread reads kio reads if RAW disk rdisk reads reads reads RAW disk rdisk reads rlentime kio rlentime rtime kio rtime rlastupdate kio wlastupdate rcnt kio rcnt nwritten kio nwritten if RAW disk rdisk nwritten nwritten nwritten RAW disk rdisk nwritten writes kio writes if RAW disk rdisk writes writes writes RAW disk rdisk nwritten wlentime kio wlentime wtime kio wtime wlastupdate kio wlastupdate wcnt kio wcnt elapsed etime wlastupdate RAW disk rdisk wlastupdate if elapsed etime 0 hz etime elapsed etime nanosecond big etime 1024 0 hz etime else elapsed etime nanosecond hz etime 1 0 big etime 1024 0 RAW disk rdisk reads reads RAW disk rdisk reads hz etime RAW disk rdisk kreads nread RAW disk rdisk nread big etime RAW disk rdisk writes writes RAW disk rdisk writes hz etime RAW disk rdisk kwrites nwritten RAW disk rdisk nwritten big etime read writes elapsed etime RAW disk rdisk reads RAW disk rdisk writes 1024 0 if read writes 0 RAW disk rdisk avg wait wlentime RAW disk rdisk wlentime read writes RAW disk rdisk avg serv rlentime RAW disk rdisk rlentime read writes RAW disk rdisk service RAW disk rdisk avg wait RAW disk rdisk avg serv else RAW disk rdisk avg wait 0 0 RAW disk rdisk avg serv 0 0 RAW disk rdisk service 0 0 Update the counters RAW disk rdisk run percent 100 0 rtime RAW disk rdisk rtime elapsed etime RAW disk rdisk wait percent 100 0 wtime RAW disk rdisk wtime elapsed etime RAW disk rdisk writes writes RAW disk rdisk nwritten nwritten RAW disk rdisk wlastupdate wlastupdate RAW disk rdisk wlentime wlentime RAW disk rdisk wtime wtime RAW disk rdisk wcnt wcnt RAW disk rdisk reads reads RAW disk rdisk nread nread RAW disk rdisk rlastupdate rlastupdate RAW disk rdisk rlentime rlentime RAW disk rdisk rtime rtime RAW disk rdisk rcnt rcnt kstat close kc Map long device names for any drives that we just discovered if RAW disk map 1 raw disk map endif RAWDISK END 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 string col previous comment MAX COLUMNS Previous comments int current column 0 The current column int previous number columns 1 Number columns printed last int print header 1 Flag to flush header This is a list of the extensions the compress programs add to the compress filename define NUMBER COMPRESS SUFFIXES 3 string compression suffixes NUMBER COMPRESS SUFFIXES Z gz bz2 Add one column of comments and data to the buffers put output string comment string data if current column 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 Send the stored columns of information to the output print columns string data int i for i 0 i 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

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


  • name 16 char short name 16 SE for 2 6 2 7 appears to have a bug where MAX DISK is too large when an A1000 raid controller is present It s not really SE as iostat had to be patched for the same bug The bug appears to be tied to a failure to update the kstat interface diskinfo uses to map short names to long names Since raw disk update has already identified how many physical devices are present and they are listed first we limit our self to mapping the first RAW disk count device name for i 0 i nread nread RAW disk rdisk nread reads kio reads if RAW disk rdisk reads reads reads RAW disk rdisk reads rlentime kio rlentime rtime kio rtime rlastupdate kio wlastupdate rcnt kio rcnt nwritten kio nwritten if RAW disk rdisk nwritten nwritten nwritten RAW disk rdisk nwritten writes kio writes if RAW disk rdisk writes writes writes RAW disk rdisk nwritten wlentime kio wlentime wtime kio wtime wlastupdate kio wlastupdate wcnt kio wcnt elapsed etime wlastupdate RAW disk rdisk wlastupdate if elapsed etime 0 hz etime elapsed etime nanosecond big etime 1024 0 hz etime else elapsed etime nanosecond hz etime 1 0 big etime 1024 0 RAW disk rdisk reads reads RAW disk rdisk reads hz etime RAW disk rdisk kreads nread RAW disk rdisk nread big etime RAW disk rdisk writes writes RAW disk rdisk writes hz etime RAW disk rdisk kwrites nwritten RAW disk rdisk nwritten big etime read writes elapsed etime RAW disk rdisk reads RAW disk rdisk writes 1024 0 if read writes 0 RAW disk rdisk avg wait wlentime RAW disk rdisk wlentime read writes RAW disk rdisk avg serv rlentime RAW disk rdisk rlentime read writes RAW disk rdisk service RAW disk rdisk avg wait RAW disk rdisk avg serv else RAW disk rdisk avg wait 0 0 RAW disk rdisk avg serv 0 0 RAW disk rdisk service 0 0 Update the counters RAW disk rdisk run percent 100 0 rtime RAW disk rdisk rtime elapsed etime RAW disk rdisk wait percent 100 0 wtime RAW disk rdisk wtime elapsed etime RAW disk rdisk writes writes RAW disk rdisk nwritten nwritten RAW disk rdisk wlastupdate wlastupdate RAW disk rdisk wlentime wlentime RAW disk rdisk wtime wtime RAW disk rdisk wcnt wcnt RAW disk rdisk reads reads RAW disk rdisk nread nread RAW disk rdisk rlastupdate rlastupdate RAW disk rdisk rlentime rlentime RAW disk rdisk rtime rtime RAW disk rdisk rcnt rcnt kstat close kc Map long device names for any drives that we just discovered if RAW disk map 1 raw disk map endif RAWDISK END 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 The default interval is d seconds n SAMPLE INTERVAL fprintf stderr s uses the following environmental variables n program name fprintf stderr OUTDIR directory to write log files output to stdout if not set n fprintf stderr WEB SERVER string to search for number of web servers i e httpd n fprintf stderr WEB LOG location of web server access log i e httpd logs access n fprintf stderr GATEWAY special address to monitor i e some where com n fprintf stderr SEARCHURL match for search scripts default is search cgi n fprintf stderr COMPRESSOR compress previous days logs with this command i e gzip 9 n fprintf stderr Add these defines to enable monitoring of specific subsystems 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

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


  • name 16 char short name 16 SE for 2 6 2 7 appears to have a bug where MAX DISK is too large when an A1000 raid controller is present It s not really SE as iostat had to be patched for the same bug The bug appears to be tied to a failure to update the kstat interface diskinfo uses to map short names to long names Since raw disk update has already identified how many physical devices are present and they are listed first we limit our self to mapping the first RAW disk count device name for i 0 i nread nread RAW disk rdisk nread reads kio reads if RAW disk rdisk reads reads reads RAW disk rdisk reads rlentime kio rlentime rtime kio rtime rlastupdate kio wlastupdate rcnt kio rcnt nwritten kio nwritten if RAW disk rdisk nwritten nwritten nwritten RAW disk rdisk nwritten writes kio writes if RAW disk rdisk writes writes writes RAW disk rdisk nwritten wlentime kio wlentime wtime kio wtime wlastupdate kio wlastupdate wcnt kio wcnt elapsed etime wlastupdate RAW disk rdisk wlastupdate if elapsed etime 0 hz etime elapsed etime nanosecond big etime 1024 0 hz etime else elapsed etime nanosecond hz etime 1 0 big etime 1024 0 RAW disk rdisk reads reads RAW disk rdisk reads hz etime RAW disk rdisk kreads nread RAW disk rdisk nread big etime RAW disk rdisk writes writes RAW disk rdisk writes hz etime RAW disk rdisk kwrites nwritten RAW disk rdisk nwritten big etime read writes elapsed etime RAW disk rdisk reads RAW disk rdisk writes 1024 0 if read writes 0 RAW disk rdisk avg wait wlentime RAW disk rdisk wlentime read writes RAW disk rdisk avg serv rlentime RAW disk rdisk rlentime read writes RAW disk rdisk service RAW disk rdisk avg wait RAW disk rdisk avg serv else RAW disk rdisk avg wait 0 0 RAW disk rdisk avg serv 0 0 RAW disk rdisk service 0 0 Update the counters RAW disk rdisk run percent 100 0 rtime RAW disk rdisk rtime elapsed etime RAW disk rdisk wait percent 100 0 wtime RAW disk rdisk wtime elapsed etime RAW disk rdisk writes writes RAW disk rdisk nwritten nwritten RAW disk rdisk wlastupdate wlastupdate RAW disk rdisk wlentime wlentime RAW disk rdisk wtime wtime RAW disk rdisk wcnt wcnt RAW disk rdisk reads reads RAW disk rdisk nread nread RAW disk rdisk rlastupdate rlastupdate RAW disk rdisk rlentime rlentime RAW disk rdisk rtime rtime RAW disk rdisk rcnt rcnt kstat close kc Map long device names for any drives that we just discovered if RAW disk map 1 raw disk map endif RAWDISK END 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 The default interval is d seconds n SAMPLE INTERVAL fprintf stderr s uses the following environmental variables n program name fprintf stderr OUTDIR directory to write log files output to stdout if not set n fprintf stderr WEB SERVER string to search for number of web servers i e httpd n fprintf stderr WEB LOG location of web server access log i e httpd logs access n fprintf stderr GATEWAY special address to monitor i e some where com n fprintf stderr SEARCHURL match for search scripts default is search cgi n fprintf stderr COMPRESSOR compress previous days logs with this command i e gzip 9 n fprintf stderr Add these defines to enable monitoring of specific subsystems 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

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


  • in run state Define global for tracking raw disk data define MAX RAWDISKS 512 RawDisk RAW disk MAX RAWDISKS int RAW disk map 0 int RAW disk count 0 double RAW disk lastupdate Function to scan kstat and map short device names to long device names raw disk map int i int j 0 char long name 16 char short name 16 SE for 2 6 2 7 appears to have a bug where MAX DISK is too large when an A1000 raid controller is present It s not really SE as iostat had to be patched for the same bug The bug appears to be tied to a failure to update the kstat interface diskinfo uses to map short names to long names Since raw disk update has already identified how many physical devices are present and they are listed first we limit our self to mapping the first RAW disk count device name for i 0 i nread nread RAW disk rdisk nread reads kio reads if RAW disk rdisk reads reads reads RAW disk rdisk reads rlentime kio rlentime rtime kio rtime rlastupdate kio wlastupdate rcnt kio rcnt nwritten kio nwritten if RAW disk rdisk nwritten nwritten nwritten RAW disk rdisk nwritten writes kio writes if RAW disk rdisk writes writes writes RAW disk rdisk nwritten wlentime kio wlentime wtime kio wtime wlastupdate kio wlastupdate wcnt kio wcnt elapsed etime wlastupdate RAW disk rdisk wlastupdate if elapsed etime 0 hz etime elapsed etime nanosecond big etime 1024 0 hz etime else elapsed etime nanosecond hz etime 1 0 big etime 1024 0 RAW disk rdisk reads reads RAW disk rdisk reads hz etime RAW disk rdisk kreads nread RAW disk rdisk nread big etime RAW disk rdisk writes writes RAW disk rdisk writes hz etime RAW disk rdisk kwrites nwritten RAW disk rdisk nwritten big etime read writes elapsed etime RAW disk rdisk reads RAW disk rdisk writes 1024 0 if read writes 0 RAW disk rdisk avg wait wlentime RAW disk rdisk wlentime read writes RAW disk rdisk avg serv rlentime RAW disk rdisk rlentime read writes RAW disk rdisk service RAW disk rdisk avg wait RAW disk rdisk avg serv else RAW disk rdisk avg wait 0 0 RAW disk rdisk avg serv 0 0 RAW disk rdisk service 0 0 Update the counters RAW disk rdisk run percent 100 0 rtime RAW disk rdisk rtime elapsed etime RAW disk rdisk wait percent 100 0 wtime RAW disk rdisk wtime elapsed etime RAW disk rdisk writes writes RAW disk rdisk nwritten nwritten RAW disk rdisk wlastupdate wlastupdate RAW disk rdisk wlentime wlentime RAW disk rdisk wtime wtime RAW disk rdisk wcnt wcnt RAW disk rdisk reads reads RAW disk rdisk nread nread RAW disk rdisk rlastupdate rlastupdate RAW disk rdisk rlentime rlentime RAW disk rdisk rtime rtime RAW disk rdisk rcnt rcnt kstat close kc Map long device names for any drives that we just discovered if RAW disk map 1 raw disk map endif RAWDISK END 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 The default interval is d seconds n SAMPLE INTERVAL fprintf stderr s uses the following environmental variables n program name fprintf stderr OUTDIR directory to write log files output to stdout if not set n fprintf stderr WEB SERVER string to search for number of web servers i e httpd n fprintf stderr WEB LOG location of web server access log i e httpd logs access n fprintf stderr GATEWAY special address to monitor i e some where com n fprintf stderr SEARCHURL match for search scripts default is search cgi n fprintf stderr COMPRESSOR compress previous days logs with this command i e gzip 9 n fprintf stderr Add these defines to enable monitoring of specific subsystems n fprintf stderr DWATCH WEB watch web server access logs

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



  •