How to check Utilization of single filesystem


 
Thread Tools Search this Thread
Operating Systems Solaris How to check Utilization of single filesystem
# 1  
Old 03-03-2011
Error How to check Utilization of single filesystem

Hi all
I am facing high utilization of my root partition. below is the output of df -h
Code:
bash-3.00# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10        9.9G   9.4G   406M    96%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    15G   1.5M    15G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
/platform/SUNW,Netra-T2000/lib/libc_psr/libc_psr_hwcap1.so.1
                       9.9G   9.4G   406M    96%    /platform/sun4v/lib/libc_psr.so.1
/platform/SUNW,Netra-T2000/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                       9.9G   9.4G   406M    96%    /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                    15G    34M    15G     1%    /tmp
swap                    15G    32K    15G     1%    /var/run
/dev/md/dsk/d30         54G    19G    35G    35%    /opt
home                    54G    14G    40G    26%    /home

As you can see Filesystem /dev/md/dsk/d10 mounted on / is 96% utilized. how can i view the detailed utilization of this device only. if i use du -sh /* i get utilization of complete system i guess around 440GB.
How can i get stats for /dev/md/dsk/d10 only.

Thanks for the help.

Last edited by Scott; 03-03-2011 at 02:20 PM.. Reason: Please use code tags.
# 2  
Old 03-03-2011
From du man page:
Code:
-x 

When evaluating file sizes, evaluate only those files that have the same device as the file specified by the file operand.

So this should work:
Code:
du -shx /

# 3  
Old 03-03-2011
Question

Thanks for the reply bartus11 i tried this in two ways and here is the output:

Code:
bash-3.00# /usr/xpg4/bin/du -shx /
 3.0G

this was confusing so i tried it with /*

Code:
bash-3.00# /usr/xpg4/bin/du -shx /*
   1K /bin
   1K /cdrom
 761K /dev
 142K /devices
  59M /etc
   1K /export
   1K /gconfd-root
  14G /home
  37M /kernel
  29M /lib
  15K /log.dev
   8K /lost+found
   1K /mnt
   0K /net
  18G /opt
   1K /orbit-root
  12M /platform
  85G /proc
   3K /rmdisk
 1.3M /sbin
   1K /system
  35M /tmp
   0K /usage4.txt
 2.5G /usr
 281M /var
   0K /vol

now i am even more confused Smilie. The first one says 3.0G and shows no details Utilization is 9.4G. the second command shows 85G for /proc alone Smilie.

What to do?

Last edited by pludi; 03-03-2011 at 03:40 PM..
# 4  
Old 03-03-2011
Try:
Code:
du -hx /

Don't use /*, as it will expand to filesystems like /opt or /home.
# 5  
Old 03-03-2011
I suspect three gigs is correct for /usr/xpg4/bin/du -shx / -- for existing files anyway. There could well be many gigs of deleted files still on the disk: The filenames are gone, but the file still exists because something had it open, it'll only truly be deleted when they close.

I see you have no /var/ partition, so your logfiles were ending up in the root partition itself. If someone went and deleted your logfiles instead of truncating them, any loggers that had them open would continue happily using the deleted files.

A reboot may fix it, or you could try and track it down with fuser and restart the affected services.
# 6  
Old 03-03-2011
Question

Thanks Corona and Bartus. Yeah i Believe Corona you are correct cause thats the thought that has been troubling me. Here is the output of du without -s
Code:
/usr/xpg4/bin/du -hx /
   8K /lost+found
   2K /var/sadm/install/admin
   3K /var/sadm/install/logs
  16M /var/sadm/install
   2K /var/sadm/pkg/SUNWocfd/install
   2K /var/sadm/pkg/SUNWocfd/save/pspool/SUNWocfd/install
   8K /var/sadm/pkg/SUNWocfd/save/pspool/SUNWocfd
   9K /var/sadm/pkg/SUNWocfd/save/pspool
 .
.
.
.
   1K /rmdisk/unnamed_rmdisk
   3K /rmdisk
   2K /.ssh
   1K /orbit-root
   1K /gconfd-root
 3.0G

Once again Final output 3.0G. How do i use *fuser* to track the culprits?

Moderator's Comments:
Mod Comment Please use code tags.

Last edited by Scott; 03-03-2011 at 04:53 PM..
# 7  
Old 03-03-2011
Start by identifying the log files that are in use on your host.

Most people use /etc/logadm.conf to manage log rotation, although sometimes scripts are written for "quick & dirty" log truncation. Check /var/spool/cron/crontabs for entries that might be performing inappropriate log pruning...

Some applications (like apache) have their own log rotation mechanisms - you may want to check these as well to ensure that they aren't broken in some fashion.

If you can resolve your log rotation issues correctly, you can force them to rotate and release any "empty" space.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

How to check overall hard disk utilization in UNIX?

how to check overall hard disk utilization in unix? we use bdf command to find the utilized space for the particular path bdf filepath how can i find overall hard disk utilization? (4 Replies)
Discussion started by: ashwanthfrq
4 Replies

2. Red Hat

Need to check full utilization of my pc RAM - any commands ???

hi guys, I wanted to utilize my PC's full RAM memory to check its performance, for that how can i perform this full RAM utilization with the help of a process or a command in rhel 6. for example, in windows, while checking the harddisk for error (chkdsk - command ) could takes full RAM... (7 Replies)
Discussion started by: redhatlbug
7 Replies

3. Shell Programming and Scripting

Check if NAS filesystem is mounted

Anyone know the best way to check and see if a NAS filesystem is mounted on a linux box. I have no idea where to start :wall:. (2 Replies)
Discussion started by: d3mon_spawn
2 Replies

4. Shell Programming and Scripting

script to check high cpu utilization for java process

Hello Team, I need help in preparing script to check for high cpu utilisation for java process. I have many java process on my system which consumes high cpu so i have to monitor it using script. ---------- Post updated 12-10-10 at 02:21 AM ---------- Previous update was 12-09-10 at... (1 Reply)
Discussion started by: coolguyamy
1 Replies

5. Solaris

check the utilization of kernel values ?

Any native Solaris commands/scripts to check the utilization of kernel tables/limits in Solaris ? (like equivalent command in HPUX is kcusage) (2 Replies)
Discussion started by: thamurali
2 Replies

6. SuSE

How to check Memory Utilization by each process

If following is the usage of cat /proc/meminfo MemTotal: 4051304 kB MemFree: 28544 kB Buffers: 216848 kB Cached: 3398628 kB SwapCached: 0 kB Active: 455460 kB Inactive: 3291612 kB HighTotal: 0 kB HighFree: 0 kB... (5 Replies)
Discussion started by: bryanabhay
5 Replies

7. Shell Programming and Scripting

Check for the Processes in Unix and also CPU utilization

What is the command for checking all the processes running on UNIX. Alos can any one share the CPU utilization script to know what are all the processes running and what is the cpu utilization ... thanks in advance Perla Mohan (3 Replies)
Discussion started by: perlamohan
3 Replies

8. Solaris

Unable to check / filesystem

Hi buddies, I have T1000 and Solaris 10 installed on it. After a power failure system shut down improperly. Error Message is WARNING - Unable to repair the / filesystem. Run fsck manually (fsck -F ufs /dev/rdsk/c0t0d0s0). Jul 18 10:16:09 svc.startd:... (6 Replies)
Discussion started by: ahsen
6 Replies

9. Shell Programming and Scripting

Check space utilization in recursive mode

Hi friends, I have the following query.. Suppose I have the parent directory as /home/suresh/Jobs and assume there are many child ub-directories created within this parent directory I would like to fire a command which will give me the space utilization within each of the child... (1 Reply)
Discussion started by: sureshg_sampat
1 Replies

10. SCO

How to check CPU Utilization

Hi All, I want to check the CPU Utilization for my SCO UNIX machine. Please suggest some commands to do that. Thanks, Am (2 Replies)
Discussion started by: am_yadav
2 Replies
Login or Register to Ask a Question