sar -q .. possible wrong

sar -q .. possible wrong

Post by mayer han » Tue, 15 Jan 2002 19:35:07



hi all

below the output of "sar -q"
if i try to calculate the average of the runqueue-size
i never get the value 3.2
any ideas, what are the empty fields ?
this is an admin station, which has not high load.

root> sar -q

SunOS hostname 5.7 Generic_106541-14 sun4m    01/14/02

00:01:00 runq-sz %runocc swpq-sz %swpocc
00:21:01
00:41:00     1.0       0
01:01:00     1.0       1
01:21:00     1.0       0
01:41:00
02:01:00
02:21:00     1.0       0
02:41:00     1.0       0
03:01:00     2.0       0
03:21:00     1.0       1
03:41:00
04:01:00     1.0       0
04:21:00
04:41:00     1.0       0
05:01:00     4.1       6
05:21:00
05:41:00
06:01:01     1.0       0
06:21:00
06:41:00     1.0       0
07:01:00
07:21:00
07:41:00     1.0       0
08:01:00     1.0       0
08:21:00     1.0       0
08:41:01     1.0       0
09:01:00     1.0       0
09:21:00
09:41:00     1.0       0
10:01:01
10:21:00
10:41:00     1.0       0
11:01:00     1.0       0

Average      3.2       0

--
best regards from vienna           |  
hans                               |   mayer (at) relay.bfl.at_SPAM

 
 
 

1. AIX, sar and perl (what am I doing wrong?)

I have the following perl script. Which is supposed to execute
the UNIX 'sar' command, descard any header information from the
sar output and save the performance data in an output file.

The script works, but it never saves data to the output file
"sar.out" until the close(SARF) gets executed. What should I
do to save data to the output file after every sample (line)?

Any ideas?? by the way, I am running perl 5.004_04 under AIX
4.3.2.

Thanks,
Juan

----- script starts here -----
#!/usr/bin/perl

use FileHandle;

sub collect_sar
{

  open(SARF,">$outf");
  autoflush SARF;


  autoflush SAR;

  while(<SAR>) {
    if ( /^\d\d:\d\d:\d\d\s+\d+\s+\d+\s+\d+\s+\d+/ ) {
      print SARF $_;
    }
  }
  close(SAR);
  close(SARF);

&collect_sar(15,5,"sar.out");

----- script ends here -----

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

2. How to create Multiple Filesystems ??

3. "sar -f <file>" fails with "sar: malloc failed"

4. Apache installation problem

5. sar problem: updates timestamp, but no sar data

6. /etc/fstab LABEL=/ stuff

7. MKE2FS: mke2fs on the WRONG Partition. Recovery possible?

8. Cannot mount AFFS SCSI hdd on Linux 2.4.0

9. Is this possible and why does it go wrong ???

10. local serial printer prints at wrong baud rate or wrong # bits

11. Wrong major or minor number --but it's wrong

12. mount: wrong fs type,... What's wrong?