I'm having problem with /var directory which is keep increasing. Here's the output of bdf and du command
bdf and du command reported different size of used space, 2,139,568 - 1,615,552 = 524,016 KB. Can someone tell me how to find this file ?
Here's detail of /var directory
FYI, this is what I've done to reduce size of /var directory
- nulling log file such as /var/adm/wtmp
- trimming /var/mail/oracle using vi editor
- delete file such as /var/preserve/Ex*
- delete /var/adm/crash/crash.5 directory and its content
- delete an application log file on /var/tmp, initially I tried to null it with "cat /dev/null > trasym.ulma" command but it didn't work so I delete it. After I delete it, this file appeared again with same size before the deletion. After several times of deletion, finally this file is disappeared. Unfortunately I forgot to check with "fuser" command when delete this file to ensure that the respective process is already stop
I would always prefer to:-
.... to get the biggest at the bottom. You can also:-
.... to get the biggest files in the current directory.
Does that direct you anywhere?
I see that /var/preserve is quite large. This is normally where editor recovery files are left. Perhaps they could be pruned. There is also mail waiting to be read. Have a look in /var/mail and for each large file, get the user to read their mail. These are normally the output from cron jobs, so perhaps you have something that works, but issues messages that you need to take care of.
I hope that this helps, but feel free to ask more if you still need help.
There's no file missing. du reports the disk usage by files/directories. But there's more to that: file system infra structure/meta data like super blocks are consuming disk space. Plus, the OS reserves some space for emergency root access (not sure if this holds true for data file systems). This is what df reports. It goes without saying that the two infos differ.
I forgot to say something else, quite important. If you have removed a large file (or large total size of files) and there was no change in the usage, then it could be that the file was in-use. The only thing you will have done is is to remove the entry from the directory it is in. The filesystem as a whole will still have the blocks marked as used until the process that has it open ends / closes it.
Use can use the fuser command to look for deleted files that are still in use on a filesystem. It depends on your OS as to what flags to use.
You are in the HP-UX thread, but I'm only a 11.11, so my fuser does not have this as an option. On other platforms, you could use something like:-
Not sure if this helps, but I thought I should bring it up.
How much load do you have on your box, and what consumes midaemon?
Now, the file you deleted will only release its space if it were not used... since it was growing I doubt...
Hi vbe,
It ranges between 1.00 and 2.00 on daily basis. Here's today load
As you can see, midaemon isn't running.
Quote:
Originally Posted by rbatte1
I forgot to say something else, quite important. If you have removed a large file (or large total size of files) and there was no change in the usage, then it could be that the file was in-use. The only thing you will have done is is to remove the entry from the directory it is in. The filesystem as a whole will still have the blocks marked as used until the process that has it open ends / closes it.
Use can use the fuser command to look for deleted files that are still in use on a filesystem. It depends on your OS as to what flags to use.
You are in the HP-UX thread, but I'm only a 11.11, so my fuser does have this as an option. On other platforms, you could use something like:-
Not sure if this helps, but I thought I should bring it up.
Robin
Hi rbatte1,
Yes, I've removed a single large file with size about 1.5 GB from /var/tmp directory. It was an application log file and I thought it was safe to delete it. It took several times of deletion before this file is totally disappeared. After that I ran bdf command and see no change on usage. I thought this is the root cause but it only last for a while. This log file is generated again by the application but with a smaller size.
Beside this file, I've also deleted some other files. I was panic at that time so I didn't record properly what files on which directory that I've deleted. Maybe one or several of them caused this problem. Current conclusion is I have to find process that is still accessing these files and kill it in order to release those files.
I'm using HP-UX 11.11 too but fuser command only support following options
Correct me if I'm wrong, since English isn't my native language Based on above options, fuser command can not be used to find process that is using deleted file.
Is there any other command that I can use for this purpose ?
I hope that it helps. I don't have the tool crashinfo available on my HPUX server. It seem that you have to request it from HP support, according to this article:-
I have been searching and reading about syslog. I would like to know how to Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog.
tail -f /var/log/messages
dblogger: msg_to_dbrow: no logtype using missing
dblogger: msg_to_dbrow_str: val ==... (2 Replies)
Hi Friends,
Actually in an linux server , there was printer jobs files occupying more space in /var/spool/cups so i want a script for deleting the files once in two week since i need the latest two weeks files.
Thanks in advance..Waiting for the script. (2 Replies)
Hi there,
I'm working on a Suse 8 based system and picked up that the crontab was missing. after some investigation i realized that the hole /var directory is missing. :mad:
I would like to now if its common for this directory to go missing?
Can I copy another Suse 8 /var directory to this... (10 Replies)
Hi,
There is no "administrator" file in "/var/mail" directory........
can any one tell me what could be the reason for that?...and also how to resolve that???
Thanks,
~Kavi (4 Replies)
Hi Everyone,
My var directory is showing near to 100% ? What are the files should i delete to make it less??
Kindly suggest
# bdf -i
Filesystem kbytes used avail %used iused ifree %iuse Mounted on
/dev/vg00/lvol3 1048576 107616 933616 10% 3342 29394 10% /... (10 Replies)
Hello, I recently found that my /var/sadm/install/contents, ~/admin/default, /var/spool/patch and /var/spool/pkg files were empty.
This broke the pkginfo, pkgchk and other package related tools.
The pkgmap no longer points to where the applications have been installed.
I have replaced the... (0 Replies)
Hi All,
I have some threaded applications. Design of the application is such that one thread will decode some data and put it in data structure, And main thread will wait for another child threads pick up the decoded data. The data will be large decoded files.
Once decoded data is picked by... (1 Reply)
Thank you 98_1LE....
Please help required urgently...
We are getting error message in SUN... Please give solution
ERROR MESSAGE:
NOTICE: alloc: /var: file system full
Output of command "df -k" in our system is...
Filesystem kbytes used avail capacity Mounted on... (1 Reply)