LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   du -sh command hangs (https://www.linuxquestions.org/questions/linux-enterprise-47/du-sh-command-hangs-4175572236/)

zeeshan047 02-16-2016 03:06 AM

hi,
Second command is running for last 1 hour and still no result, I have executed second command on another server which have same directories and configuration and it took 3 seconds and the result is 24971.

Code:

[root@racnode1 ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
shmfs on /dev/shm type tmpfs (rw,size=13g)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
oracleasmfs on /dev/oracleasm type oracleasmfs (rw)
none on /var/lib/xenstored type tmpfs (rw)

[root@racnode1 ~]# ls -LR /u01/app/11.2.0/grid/ |wc -l

zeeshan047 02-16-2016 03:41 AM

hi,
Second command is running for last 1 hour and still no result , I have executed second command on another server which has same directory structure and configuration, it took 3 seconds and the result is 24971.

Code:
[root@racnode1 ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
shmfs on /dev/shm type tmpfs (rw,size=13g)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
oracleasmfs on /dev/oracleasm type oracleasmfs (rw)
none on /var/lib/xenstored type tmpfs (rw)

[root@racnode1 ~]# ls -LR /u01/app/11.2.0/grid/ |wc -l

pan64 02-16-2016 03:42 AM

please try df -ih on both hosts and post/compare the results

zeeshan047 02-16-2016 05:03 AM

First one is the server facing problem.

Code:


[root@racnode1 ~]# df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup00-LogVol00
30M 4.3M 26M 15% /
/dev/cciss/c0d0p1 26K 56 26K 1% /boot
tmpfs 2.0M 169 2.0M 1% /dev/shm
shmfs 2.0M 169 2.0M 1% /dev/shm
none 2.0M 4 2.0M 1% /var/lib/xenstored


-bash-3.2$ df -ih
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda3 7.0M 274K 6.7M 4% /
/dev/sda1 101K 57 101K 1% /boot
tmpfs 219K 274 219K 1% /dev/shm

pan64 02-16-2016 05:22 AM

30M 4.3M 26M 15% /
that means at about 4.3M files to count. That will take some time.

cliffordw 02-16-2016 08:32 AM

Quote:

Originally Posted by pan64 (Post 5500898)
what will say: ls -lR /u01/app/11.2.0/grid | wc -l
probably it will take time too, in that case please tell us how long does it take.
also what will respond the command mount?

Great idea! One small suggestion: find will achieve the same thing, and might be faster if there are many files, as it doesn't need to sort them first:

Code:

find /u01/app/11.2.0/grid -print | wc -l

cliffordw 02-16-2016 08:37 AM

Quote:

Originally Posted by pan64 (Post 5500959)
30M 4.3M 26M 15% /
that means at about 4.3M files to count. That will take some time.

Compared to 274K on the server where there is no problem. No wonder they don't perform the same ;-)

pan64 02-16-2016 08:39 AM

Quote:

Originally Posted by cliffordw (Post 5501033)
Great idea! One small suggestion: find will achieve the same thing, and might be faster if there are many files, as it doesn't need to sort them first:

Code:

find /u01/app/11.2.0/grid -print | wc -l

in that case ls -lRU can be used too

zeeshan047 02-17-2016 08:12 AM

issue solved , problem was there are lot of trace and log files on the server of size 55 GB causing the problem i have deleted all the log and trace files now , du -sh command working fine.

Thank you all .

Regards
Zeeshan


All times are GMT -5. The time now is 10:38 AM.