- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Identifying the files in different /var file syste...
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
12-16-2005 07:00 AM
12-16-2005 07:00 AM
We usually receive the alerts for full disk space from /var file systems.
We have 3 /var file system as shown below:-
/dev/vg00/lvol8 /var
/dev/vg01/syslogs /var/opt/logs
/dev/vg00/lvol9 /var/adm/crash
supposing the case of alerts received from all the above 3 file systems; I need to identify before deleting the files they
belong to which particular /var file system ?
Thanks,
Shiv
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2005 07:05 AM
12-16-2005 07:05 AM
Re: Identifying the files in different /var file systems
# find /var -name "$FILE" -print
Since you are not using the -xdev option to find, it will cross over file system mount points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2005 07:05 AM
12-16-2005 07:05 AM
Re: Identifying the files in different /var file systems
Here it is :
You need to check /var/ filesystem for big files , and not /var/adm/crash and /var/opt/logs , as /var filesystem got alert.
Here how you can do that easily:
1.
# cd /var
# find . -type f -xdev -exec ls -l {} \; > /tmp/out.txt
[ out.txt will contain all the files from /var file systems. ]
2.
# cat tmp.out | sort +4 -5nr > /tmp/out1.txt
Check for the file out11.txt for largest files , and it will be in order from highest to lowest size.
Hope this will help ,
Enjoy,
hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2005 07:07 AM
12-16-2005 07:07 AM
SolutionThe alert message should point you to the correct filesystem, either by the mountpoint ('/var' versus '/var/opt/logs' versus '/var/adm/crash') or by the special device file on which the filesystem is mounted (e.g. '/dev/vg00/lvol9).
Of course, a 'bdf' will show you the utilization of each mountpoint and :
# du -k mountpoint | sort -k1nr | more
...will summarize the largest-to-smallest files and directories within a mountpoint.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2005 07:08 AM
12-16-2005 07:08 AM
Re: Identifying the files in different /var file systems
little mistake in my last post ,
In 2nd step the command should be:
2.
# cat /tmp/out.txt | sort +4 -5nr > /tmp/out1.txt
hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2005 07:09 AM
12-16-2005 07:09 AM
Re: Identifying the files in different /var file systems
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2005 07:13 AM
12-16-2005 07:13 AM
Re: Identifying the files in different /var file systems
Use the du command with the "-x" switch which will show output only for the filesystems of interest. For example
# du -kx /var/opt/logs | sort -nr | more
...will display the biggest files that belong only to the /var/opt/logs mount point. Repeat the process for each of the others.
hope it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2005 07:26 AM
12-16-2005 07:26 AM
Re: Identifying the files in different /var file systems
Use the du command.
du /var -ka | sort -nr | more
This will report file names and sizes in ascending order by filesize.
Use the -x option with du to not cross the mount points