cancel
Showing results for 
Search instead for 
Did you mean: 

Shutdwonlog file not update

 
Muhammad Farhan Nasir
Regular Advisor

Shutdwonlog file not update

are system shutdown on avery day throught crontab entry, but shutdownlog file not update.

but when i reboot/shutdown normal it's update
15 REPLIES
Shibin_2
Honored Contributor

Re: Shutdwonlog file not update

>> system shutdown on avery day throught crontab entry

Is it necessary ?

Is there any permission issue ? What's your OS version ?
Regards
Shibin
Muhammad Farhan Nasir
Regular Advisor

Re: Shutdwonlog file not update

i have two server with same HP-UX 11.23, one is showing write information in shutdowlog and one is ont.

i have both permission it is same see below.

problem one below
--------------------------
root:/etc #ll shut*
lrwxrwxr-t 1 root sys 18 Oct 31 2009 shutdown -> /usr/sbin/shutdown
-rw-r--r-- 1 bin bin 0 Oct 31 2009 shutdown.allow
-rw-r--r-- 1 bin bin 2394 Dec 26 12:17 shutdownlog
-----------------------
ok one below
----------------------
root:/etc #ll shut*
lrwxrwxr-t 1 root sys 18 Oct 31 2009 shutdown -> /usr/sbin/shutdown
-rw-r--r-- 1 bin bin 0 Oct 31 2009 shutdown.allow
-rw-r--r-- 1 bin bin 16372 Dec 28 06:31 shutdownlog
----------------------------------
Shibin_2
Honored Contributor

Re: Shutdwonlog file not update

what is the permission of /usr/sbin/shutdown and /sbin/shutdown ?

Regards
Shibin
Muhammad Farhan Nasir
Regular Advisor

Re: Shutdwonlog file not update

please see below reuire permissin.

problem in DB server.
----------------------------
DB

root:/ #cd /usr/sbin
root:/usr/sbin #ll shut*

lrwxrwxr-x 1 root bin 14 Oct 31 2009 shutdown -> /sbin/shutdown

root:/sbin #ll shut*

-r-sr-xr-x 1 root bin 754340 Aug 27 2004 shutdown

root:/sbin #
-----------------

apps
---------------------
root:/usr/sbin #ll shut*

lrwxrwxr-x 1 root bin 14 Oct 31 2009 shutdown -> /sbin/shutdown

root:/sbin #ll shut*

-r-sr-xr-x 1 root bin 754340 Aug 27 2004 shutdown

root:/sbin #
-------------------

i have show both permission.

any finding
Hakki Aydin Ucar
Honored Contributor

Re: Shutdwonlog file not update

They seem normal in the first place.
Can you show your full shutdown command syntax you used in crontab ?

# crontab -l

(for both server)
Muhammad Farhan Nasir
Regular Advisor

Re: Shutdwonlog file not update


DB
---------------------------
root:/ #crontab -l
# Entry for monitoring status of the EMSHAProvider
* * * * * sleep 15;/etc/opt/resmon/lbin/mon_EMSHAProvider_state.sh
# Entry for vacuuming the EMT CER DB
5 1 * * * /opt/sfm/vacuum
5,20,35,50 * * * * /opt/sfm/bin/restart_sfm.sh


##########################################
30 06 * * * /os_restrt.sh
----------------------------
apps
----------------------------
root:/ #crontab -l
# Entry for monitoring status of the EMSHAProvider
* * * * * sleep 15;/etc/opt/resmon/lbin/mon_EMSHAProvider_state.sh
# Entry for vacuuming the EMT CER DB
5 1 * * * /opt/sfm/vacuum
5,20,35,50 * * * * /opt/sfm/bin/restart_sfm.sh

######## Start and Stop Script #################


00 03 * * * /siebel_stopal.sh
30 06 * * * /os_restrt.sh
20 07 * * * /siebel_strtal.sh
-------------------------------

root:/ #
Hakki Aydin Ucar
Honored Contributor

Re: Shutdwonlog file not update

so it does not show in the first place;
one of the scripts there must be providing "shutdown" command inside so it is better to check scripts (probably restart_sfm script) on both server they are match ? ,
and actually in HP-UX as far as I know there is no option (at least for 11iv1 and 11iv2) to enable/disable the shutdown logs to write under /etc/shutdownlog .

So , I recommend you to check your system logs if there is any anomaly in system logs :

syslog /var/adm/syslog/syslog.log
mail /var/adm/syslog/mail.log
cron /var/adm/cron/log
Pete Randall
Outstanding Contributor

Re: Shutdwonlog file not update

I would guess that your system is being cycled by the os_restart.sh shown in the crontabs. Check this script to see what it is actually doing. I'm thinking that it may be doing a "reboot" rather than a "shutdown", but in any case we need to see the actual shutdown command that is being issued.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Shutdwonlog file not update

Hmmmm, I was just doing some reading in the "reboot (1m)" man page and it says /etc/shutdownlog (if it exists) should still get updated so that's not the cause. I guess we need to see the actual command that is being issued.


Pete

Pete
Muhammad Farhan Nasir
Regular Advisor

Re: Shutdwonlog file not update

Both servers crotab entry's are same, but y one has created a shutdown logs and one not.

apps = created a shutdownlogs
DB = has not created shutdown logs
Pete Randall
Outstanding Contributor

Re: Shutdwonlog file not update

What does "cat /os_restrt.sh" show us?


Pete

Pete
Dennis Handly
Acclaimed Contributor

Re: Shutdwonlog file not update

Anything different between the two servers in /var/adm/cron/log for that crontab entry that has the shutdown(1m)?

Do you have any NFS cross mounts? This may cause problems if shutting down both at the same time.

Any differences in /etc/rc.log.old between the two?
Hakki Aydin Ucar
Honored Contributor

Re: Shutdwonlog file not update

>Hmmmm, I was just doing some reading in the "reboot (1m)" man page and it says /etc/shutdownlog (if it exists) should still get updated so that's not the cause. I guess we need to see the actual command that is being issued.

I just tried to make sure that reboot and if shutdown logs go to /etc/shutdownlog in my trial server here, yes it updates the shutdoen logs. The server I used HP-UX 11iv1 by the way ,can you tell me Muhammad what is your own server version:

# uname -a
Pete Randall
Outstanding Contributor

Re: Shutdwonlog file not update

He said 11.23.


Pete

Pete
Shibin_2
Honored Contributor

Re: Shutdwonlog file not update

You are using specific script to shutdown/restart. i.e. /os_restrt.sh

Can we see this ?

Please post cat /os_restrt.sh
Regards
Shibin