Operating System - HP-UX
1833445 Members
3929 Online
110052 Solutions
New Discussion

Re: sar: Can't open /var/adm/sa/sa22

 
K.Vijayaragavan.
Respected Contributor

sar: Can't open /var/adm/sa/sa22

Hi,

1)When i do "sar" i get this error message stating "sar: Can't open /var/adm/sa/sa22".

2)Created this file manually and when i do "sar" once again it does nothing.

3)Issued the command (seen from man page)," /usr/lbin/sa/sadc /var/adm/sa/sa`date +%d` " to create sa## as described.

After this if i do sar,

It gives message stating -->
HP-UX wks1 B.11.00 A 9000/785 03/22/02

"Memory fault(Core dump)"
<---

How do i get it resolved?

Note:
->55% of /var is only used.
->It is on HPUX 11.00 B2000 Wks

-Vija
"Let us fine tune our knowledge together"
16 REPLIES 16
John Carr_2
Honored Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi

this is beacause you have not turned accounting on. you can do this from within sam

cheers
John.
Thierry Poels_1
Honored Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi,

if you launch sar without timing specifications it will get its data from an history file, which is created by a cronjob.

To see current statistics use for example:
sar -d 5 5
(display disk statistics 5 times with 5 seconds interval)

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
John Carr_2
Honored Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi

to inetractively run sar try these commands

sar 1 5

sar -o temp 60 10

sar -d -f temp

sar -u -M -f temp

checkout man pages

cheers
John.
Paula J Frazer-Campbell
Honored Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi

Cron this to start each day, I use 05:00 Hrs
And it will create and run sar throughout the day - each and every day.


00 05 * * * /sysadmin/sardump

----------------Cut here------------------

#!/bin/sh

# 1 minute
period=${1:-"60"}


iterations=${2:-"`expr 86400 / $period`"}


echo "sar: $iterations iterations at $period second intervals"
/usr/sbin/sar -A \
-o /var/adm/sa/sa`date +%d` \
$period \
$iterations > /dev/null
------------------ Cut Here-----------


Change the -A switch to suit.


HTH

Paula
If you can spell SysAdmin then you is one - anon
Ruediger Noack
Valued Contributor

Re: sar: Can't open /var/adm/sa/sa22

There should be a sa1 script in your /usr/lbin/sa dir. You can put it in your crontab file to create a daily sar output file like:
0 * * * * /usr/lbin/sa/sa1 1200 3
This script creates an entry every 20 minutes in the output file sa.
See man sa1 for more details.
And remember to create the /var/adm/sa dir if it doesn't already exist.

Ruediger
K.Vijayaragavan.
Respected Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi,

Accounting is already turned on.

checked "/etc/rc.config.d/acct" for the entry "START_ACCT=1" and
rebooted the workstation

Still "sar , sar -d" gives memory fault(core dump message) .

rest all like,
1)
"sar 1 5 and
sar -o temp 60 10"
works fine.

2)
"sar -d -f temp" - returns to #prompt.

3)
"sar -u -M -f temp " - just returns to #prompt.

-Vijay
"Let us fine tune our knowledge together"
K.Vijayaragavan.
Respected Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi Ruediger,

Tried as you mentioned.
But still "sar" and "sar -d " ,displays "Memory fault(Core dump)"

-Vijay
"Let us fine tune our knowledge together"
Ruediger Noack
Valued Contributor

Re: sar: Can't open /var/adm/sa/sa22

Do you need a sar patch?

On my 11.0 box i have installed the patch bundle from March 2001 but no further single patches for sar.

Ruediger
John Carr_2
Honored Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi

2)
"sar -d -f temp" - returns to #prompt.

3)
"sar -u -M -f temp " - just returns to #prompt.



did it create a file called temp with the output ?

John.
K.Vijayaragavan.
Respected Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi,

Finally the answer may be as mentioned in this link . Let me check that too.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xaeb779bffde7d4118fef0090279cd0f9,00.html

-Vijay
"Let us fine tune our knowledge together"
K.Vijayaragavan.
Respected Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi John,

Yes! it creates the temp file.

But the commands "sar & sar -d " alone wont work and gives "memory fault (core dumped) error."

-Vijay
"Let us fine tune our knowledge together"
John Carr_2
Honored Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi

you have had 16 responses from people donating there time and efforts to help you, assigning points is a way of showing recognition for there contributions. please give a little time back and donate some points.

John

try

sar 1 99 -d

John.
Darrell Allen
Honored Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi Vijay,

Perhaps your sa## file is corrupted. I'd delete it (rm /var/adm/sa/sa##) and recreate it with:
/usr/lbin/sa/sa1

Then running sar (without specifying the interval and number of repetitions) should automatically select the sa## file for the current date.

man sa1 for more info, especially for running it via cron.

By the way, you don't have to turn on accounting for sar.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
MANOJ SRIVASTAVA
Honored Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi

You have to specify sar with some argument like sar 2 2 or sar -d 2 2 to make it work



Manoj Srivastava
K.Vijayaragavan.
Respected Contributor

Re: sar: Can't open /var/adm/sa/sa22

Hi ruediger,

can you mention the PATCH id of the sar patch you were mentioning?

-Vijay
"Let us fine tune our knowledge together"
Ruediger Noack
Valued Contributor

Re: sar: Can't open /var/adm/sa/sa22

Sorry, I have *NOT* installed an additional sar patch, only the complete patch bundle March 2001 on my box and sar runs fine.
May be there are some filesets / patches on your box not configured?
Check with:
swlist -l fileset -a state

Ruediger