- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: log files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 08:23 AM
01-24-2008 08:23 AM
Regards,
Ali
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 08:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 08:34 AM
01-24-2008 08:34 AM
Re: log files
sam
-> routine tasks
-> system log files
(select the log)
-> Actions -> trim
but there are so many other ways too ...
BUT never delete the file!
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 08:36 AM
01-24-2008 08:36 AM
Re: log files
I tried doing this, but it gives me an error.
usunx08:# cron stop
usunx08:# ! cron is already running Thu Jan 24 11:35:31 EST 2008
! ******* CRON ABORTED ******** Thu Jan 24 11:35:31 EST 2008
usunx08:#
Any suggestion in this regard?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 08:40 AM
01-24-2008 08:40 AM
Re: log files
In your case you must restart cron.
In general before removing a file you check it using the "fuser" command. The fuser command will show you if the file is open and which process has it open.
Some daemons will listen to a HUP signal to reread their config environment. These are syslogd, crond etc.
The standard method for rolling a syslog log file is
1) mv syslog.log syslog.log-old (the move command does not impact an open file. The new name is still open by the same process and still being logged on)
2) kill -HUP
A new syslog.log will be created.
Using this method, there is no interuption in the daemon coverage. If you restart a daemon you will have a 3-5 seconds of no-daemon service. It depends how critical you server environment is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 08:40 AM
01-24-2008 08:40 AM
Re: log files
/sbin/init.d/cron start
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 08:55 AM
01-24-2008 08:55 AM
Re: log files
Not sure why you had problems. This works for me:
# /sbin/init.d/cron stop
cron stopped
# /sbin/init.d/cron start
cron started
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 08:59 AM
01-24-2008 08:59 AM
Re: log files
Using the '/sbin/init.d/cron' script to stop and (re)start your cron daemon has the advantage that the current '/var/adm/cron/log' is moved to '/var/adm/cron/OLDlog' and the 'cron' daemon restarted when the script's argument is "start". You can then compress or remove the 'OLDlog' as you see fit.
There is NO PROBLEM with removing an open file! In fact, it is a common technique to open a temporary file and immediately 'unlink()' it. A file's disk space remains inuse until the last process referencing it terminates and the in-use count decrements to zero. Moving a file with 'mv' retains the inode number of a file but allows its name to be changed. Thus the association between a process and the inode remains and in the case of log files, the logging continues.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2008 09:05 AM
01-24-2008 09:05 AM
Re: log files
Are you sure you are on a HPUX box?
usunx08
If this a sun try
# /etc/init.d/cron stop
# /etc/init.d/cron start
Regards,
Robert-Jan