- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /var is 85%, need your help
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
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
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
07-14-2012 06:45 AM
07-14-2012 06:45 AM
/var is 85% ....need your help ....friends...?
Hi,
/var is 85% need to bring the value below 85%.....How ?
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol8 1159168 973360 174547 85% /var
I have checked the syslog directoty and it is consuming lot of space.
How to take back up of syslog file and then Nullify the original one.
Please help me with the commands.
-r--r--r-- 1 root sys 7570 Feb 8 09:54 syslog.log.old.gz
-r--r--r-- 1 root root 106134 Jul 14 00:01 mail.log
-r--r--r-- 1 root sys 8909 Jul 14 15:30 syslog.log
-rw-r--r-- 1 root sys 0 Jul 14 15:54 cp
-r--r--r-- 1 root sys 316234097 Jul 14 16:43 syslog.log
Here syslog.log file is consuming more space.
Please let me know the command to take the back up of it and then nullify the original one.
How to give date while taking backup of original file syslog.log ?
Regards,
Appu.
- Tags:
- syslog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2012 08:53 AM
07-14-2012 08:53 AM
Re: /var is 85% ....need your help ....friends...?
There are a couple of ways to do this:
#1 -- Just stop and restart the syslog daemon.
# /sbin/init.d/syslogd stop
# /sbin/init.d/syslogd start
You will now have a file in /var/adm/syslog called OLDsyslog.log. Now you can take the OLDsyslog.log and rename it and compress it.
#2 -- Copy syslog.log to another and then null the original.
# cd /var/adm/syslog
# cp -p syslog.log syslog.2012-14-jul.log
# cat /dev/null > syslog.log
# gzip syslog.2012-14-jul.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2012 09:33 AM
07-14-2012 09:33 AM
Re: /var is 85% ....need your help ....friends...?
Thank you for your assistance.
I sincerely appreciate the time you spent in helping me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2012 09:35 AM
07-14-2012 09:35 AM
Re: /var is 85% ....need your help ....friends...?
I want to know:
Q.) How to check the Version of HP-UX BOX ?
is it # uname -a ?
- Tags:
- uname
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2012 01:07 PM
07-14-2012 01:07 PM
Re: /var is 85% ....need your help ....friends...?
Yes, 'uname -a' will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2012 04:40 PM
07-14-2012 04:40 PM
Re: /var is 85% ....need your help ....friends...?
Since syslog.log is over 300 MB in size, I would very concerned about what is in that file. This is where failures and error messages are recorded. You need to look at the contents and verify that your system is healthy.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2012 09:28 PM - edited 07-15-2012 11:53 AM
07-14-2012 09:28 PM - edited 07-15-2012 11:53 AM
Re: /var is 85%, need your help
>-r--r--r-- 1 root sys 8909 Jul 14 15:30 syslog.log
>-rw-r--r-- 1 root sys 0 Jul 14 15:54 cp
>-r--r--r-- 1 root sys 316234097 Jul 14 16:43 syslog.log
Is this really correct and two syslog.log files? Does one have unprintable chars in the name?
Try "ll -b" to list the directory.
(You can also remove your bogus cp file.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2012 02:26 AM - edited 07-15-2012 02:28 AM
07-15-2012 02:26 AM - edited 07-15-2012 02:28 AM
Re: /var is 85% ....need your help ....friends...?
Want to know whether I have done right or wrong steps executed.
# /sbin/init.d/syslogd stop
syslogd stopped
# /sbin/init.d/syslogd start
System message logger started
# ls -lrt
total 622140
-r--r--r-- 1 root sys 7570 Feb 8 09:54 syslog.log.old.gz
-rw-r--r-- 1 root sys 0 Jul 14 15:54 cp
-r--r--r-- 1 root root 106569 Jul 15 00:01 mail.log
-r--r--r-- 1 root sys 9524 Jul 15 12:01 syslog.log
-r--r--r-- 1 root sys 317812919 Jul 15 12:04 OLDsyslog.log
-rw-r--r-- 1 root sys 821 Jul 15 12:04 syslog.log
# mv OLDsyslog.log OLDsyslog.log.old
# ls -lrt
total 621076
-r--r--r-- 1 root sys 7570 Feb 8 09:54 syslog.log.old.gz
-rw-r--r-- 1 root sys 0 Jul 14 15:54 cp
-r--r--r-- 1 root root 106569 Jul 15 00:01 mail.log
-r--r--r-- 1 root sys 9524 Jul 15 12:01 syslog.log
-r--r--r-- 1 root sys 317812919 Jul 15 12:04 OLDsyslog.log.old
-rw-r--r-- 1 root sys 14114 Jul 15 12:15 syslog.log
# gzip OLDsyslog.log.old
# ls -lrt
total 24798
-r--r--r-- 1 root sys 7570 Feb 8 09:54 syslog.log.old.gz
-rw-r--r-- 1 root sys 0 Jul 14 15:54 cp
-r--r--r-- 1 root root 106569 Jul 15 00:01 mail.log
-r--r--r-- 1 root sys 9524 Jul 15 12:01 syslog.log
-r--r--r-- 1 root sys 12510791 Jul 15 12:04 OLDsyslog.log.old.gz
-rw-r--r-- 1 root sys 20896 Jul 15 12:19 syslog.log
/var is decreased to 60% now :
# bdf /var
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol8 1159168 674295 454920 60% /var
I want to know whether I have executed right commands or not ?
Any help is appreciated.
Regards,
Appu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2012 11:52 AM - edited 07-15-2012 11:53 AM
07-15-2012 11:52 AM - edited 07-15-2012 11:53 AM
Re: /var is 85%, need your help
>I want to know whether I have executed right commands or not?
Well, you reduced the space. But you didn't use "ll -b" to see the unprintable chars in syslog.log.
Also, Bill suggested you look at OLDsyslog.log before you gzipped it.
Perhaps a head -100 and tail -100 of it.