- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /var continously increasing disk usage
Operating System - HP-UX
1752762
Members
4950
Online
108789
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
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
03-21-2011 11:22 PM
03-21-2011 11:22 PM
On my system, bdf output says that /var has used up 86% with disk usage of 2.6GB.But if I use du -kx on /var, it says that the whole /var folder only used around 650MB.So what could have possibly eat up the 2GB disk space?Kindly see output below.
$ bdf|grep /var
/dev/vg00/lvol8 3080192 2642616 437576 86% /var
$ sudo du -kx /var|sort -rn|more
Password:
657592 /var
236816 /var/opt
189928 /var/adm
147952 /var/adm/sw
132136 /var/adm/sw/products
$ bdf|grep /var
/dev/vg00/lvol8 3080192 2642616 437576 86% /var
$ sudo du -kx /var|sort -rn|more
Password:
657592 /var
236816 /var/opt
189928 /var/adm
147952 /var/adm/sw
132136 /var/adm/sw/products
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2011 12:12 AM
03-22-2011 12:12 AM
Solution
> So what could have possibly eat up the 2GB disk space?
A file that was deleted when it was (and still is) in use by some process.
If you have the (very useful, free) lsof utility installed, run "lsof +L1" to see deleted files that are still in use.
Example:
$ root lsof +L1
[sudo] password for mkurkela:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
firefox-b 4313 mkurkela 49w REG 254,2 3251810 0 475172 /home/mkurkela/.mozilla/firefox/80dpes3s.default/XPC.mfasl (deleted)
Here, XPC.mfasl is a file that is about 3.2 MB in size, and although it has been deleted, it is still being used by Firefox. Once Firefox is shut down, it will be automatically cleaned up by the OS, and the 3.2 MB of disk space it's currently occupying will become free again.
This is actually a legitimate programming technique: to make sure a sensitive temporary file won't be left around even if a program crashes, a programmer may make the program delete a temporary file as soon as it's been opened. This way, any POSIX-compliant system will automatically remove the temporary file as soon as the file is closed for any reason... including the program crashing.
MK
A file that was deleted when it was (and still is) in use by some process.
If you have the (very useful, free) lsof utility installed, run "lsof +L1" to see deleted files that are still in use.
Example:
$ root lsof +L1
[sudo] password for mkurkela:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
firefox-b 4313 mkurkela 49w REG 254,2 3251810 0 475172 /home/mkurkela/.mozilla/firefox/80dpes3s.default/XPC.mfasl (deleted)
Here, XPC.mfasl is a file that is about 3.2 MB in size, and although it has been deleted, it is still being used by Firefox. Once Firefox is shut down, it will be automatically cleaned up by the OS, and the 3.2 MB of disk space it's currently occupying will become free again.
This is actually a legitimate programming technique: to make sure a sensitive temporary file won't be left around even if a program crashes, a programmer may make the program delete a temporary file as soon as it's been opened. This way, any POSIX-compliant system will automatically remove the temporary file as soon as the file is closed for any reason... including the program crashing.
MK
MK
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP