1756635 Members
2380 Online
108849 Solutions
New Discussion юеВ

Re: /etc/shutdownlog

 
SOLVED
Go to solution
Glenn L. Stewart
Frequent Advisor

/etc/shutdownlog

What determines if /etc/shutdownlog is appended to or not?

On particular servers I admin, this log does not exist. ??
8 REPLIES 8
Michael Tully
Honored Contributor

Re: /etc/shutdownlog

The shutdownlog file should exist by default.
I am not sure why yours doesn't. You could create a file by using the 'touch' command.

Example Contents are as follows:
Generally the entries made are
shutdown, reboots and reboots by a user.

05:04 Sun Dec 2, 2001. Reboot:
12:35 Fri Dec 7, 2001. Reboot: (by myname!root)

The first entry is an automatic reboot, the
second being a manual reboot by a 'root'
user.

HTH
-Michael
Anyone for a Mutiny ?
Steven Sim Kok Leong
Honored Contributor

Re: /etc/shutdownlog

Hi,

/etc/shutdownlog is generated by the reboot command.

man 1m reboot for more information.

Unless your system never performs a reboot (or shutdown), /etc/shutdownlog should exist on your system.

Check your root cron jobs in /var/spool/cron/crontabs/root for any job that performs "housekeeping" by removing /etc/shutdownlog.

Hope this helps. Regards.

Steven Sim Kok Leong
Glenn L. Stewart
Frequent Advisor

Re: /etc/shutdownlog

Wondering what command creates it.

I wouldn't have ever noticed this "problem" if not for the fact that this was a fresh from factory L class.

shutdown appends the shutdownlog - BUT only if it exists.

Reboot doesn't appear to create it.
Steven Sim Kok Leong
Honored Contributor

Re: /etc/shutdownlog

Hi,

You are right indeed. reboot only appends to it. I have missed out the "(if it exists)" clause in its man page.

We had factory installs of HP-UX on our servers but we never encounter /etc/shutdownlog missing.

You might wish to alert your HP Problem Response Centre over there. The Ignite-UX image copy during factory defaults might possibly be misconfigured for your server.

Hope this helps. Regards.

Steven Sim Kok Leong
Xavier Gutierrez
Frequent Advisor
Solution

Re: /etc/shutdownlog

Just try to create it and chmod it:

# touch /etc/shutdownlog

# chmod 644 /etc/shutdownlog


Then wait until a programmed shutdown or reboot occours and watch if it worked...

Regards,

Xavier
Live fast, die young!
Helen French
Honored Contributor

Re: /etc/shutdownlog

Helen French
Honored Contributor

Re: /etc/shutdownlog

Hi,

Again, the /etc/shutdownlog can be recreated by 'tlinstall' command.

# rm /var/adm/shutdownlog
# /opt/upgrade/bin/tlinstall

HTH,
Shiju
Life is a promise, fulfill it!
Bill Hassell
Honored Contributor

Re: /etc/shutdownlog

/etc/shutdownlog is one of those files that you must check on. Old versions of HP-UX did not have this file by default. Same with /var/adm/btmp. Both of these files are critical for security and reliability. Create them on every system. Make usre that btmp is not readable by anyone except root.


Bill Hassell, sysadmin