GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Disk Fill up
Operating System - HP-UX
1846867
Members
3210
Online
110256
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
10-26-2004 02:55 PM
10-26-2004 02:55 PM
Disk Fill up
A disk fills up regularly on my system. When the disk is full a necessary process called file4 dies.The disk that fills up it /var.I need a shell script that checks the disk to see if it's full, if it is, it prunes the logfiles causing the problem in /var/log/logfile and also checks to see if the file4 process is running and if it isn't restarts it by executing /etc/init.d/file4 start
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2004 04:42 PM
10-26-2004 04:42 PM
Re: Disk Fill up
bdf | awk '{ if ($5 ~ /[8-9][0-9]/ || $5 ~ /[1][0-5][0-9]/) print }' >> $drep
rep=$(cat $drep | wc -l)
if [ $rep -ge 1 ]
mess=$(bdf /var | grep var | awk '{print $5}')
echo $mess
/usr/contrib/bin/trimlogs
else
echo no problems
fi
###
trimlogs
while read -r rfile
do
> $rfile
done < /var/filelist
/var/filelist is a list of log files with full path of files that you want to trim in an emergency.
I suggest you look in /var and build the list
Here are some suggestions
/var/adm/syslog/syslog.log
/var/mail/root
Take a look at sam routine tasks trim log files for more suggestions.
be careful, once this data is gone its done. No recycle bin.
SEP
rep=$(cat $drep | wc -l)
if [ $rep -ge 1 ]
mess=$(bdf /var | grep var | awk '{print $5}')
echo $mess
/usr/contrib/bin/trimlogs
else
echo no problems
fi
###
trimlogs
while read -r rfile
do
> $rfile
done < /var/filelist
/var/filelist is a list of log files with full path of files that you want to trim in an emergency.
I suggest you look in /var and build the list
Here are some suggestions
/var/adm/syslog/syslog.log
/var/mail/root
Take a look at sam routine tasks trim log files for more suggestions.
be careful, once this data is gone its done. No recycle bin.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2004 07:02 PM
10-26-2004 07:02 PM
Re: Disk Fill up
Have you thought of putting /var/log in its own logical volume so it doesn't affect /var?
Mark Syder (like the drink but spelt different)
Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 02:46 AM
10-27-2004 02:46 AM
Re: Disk Fill up
The solutions posted to me have not answered the question satisfactorily.I mean the script should be able to run on bash.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP