Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ls -l hangs 1

Status
Not open for further replies.
Jun 15, 2004
26
US
Hello All. I hope you all can help me with this issue I am having. In an oracle directory that has some data files I am able to do an ls but not and ls -ltr. When I try the ls -ltr the command hangs. The system is at 5.2-04. Thanks. for any help you can give me
 
try using truss to see where it stops

truss ls -ltr

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
I ran the command and found the file that it got stuck on (a .dbf file). I called the user and she said it happens on other files sometimes too(not an oracle file). What could cause it to hang on a specific file? All the other files in the directory I am able to do the ls -ltr...except for this specific one. Thank you for your help.
 
There's probably a process holding a lock on the file's inode.

Plain ls only has to read the directory file, because that's where the names are stored. To get the added info for the -lt options, it has to read the file's entry in the inode table.

Check "istat <filename>". If it hangs too, we've got the root cause.

Fixing it is another problem altogether. Maybe lsof would help you track down the offending process.



Rod Knowlton

IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Thank you all for your help. I tried to umount the filesystem to do an fsck on it but it didn't umount cleanly. When I tried to remount it after the fsck it wouldn't re-mount. I went ahead and rebooted the system. However, I did find out that 5.2-04 has an issue with locking up jfs2 filesystems so I think that is the root of my problem. I am going to update the maintenance level (or now call technology level) to hopefully fix the problem. Once again thanks for the help.
 
UPDATE THE FIRMWARE
there are some odd things going on from 5.2 ML3.
ML4 and ML5 and later it only gets worse!
Make sure you get the system firmware up to date before you update AIX.
pick your system from the drop down list.
if you don't know what the system is try
lsconf
 
Same thing happened to me on an Oracle LPAR, only fix was a reboot. Upgrading to 5200-06 seems to have solved the problem.
 
Also you might want to check your console for some obscure and terse messages: kernel inode/file table overflow or so. Though your system probably wouldn't survive a lot longer after filling such kernel tables...

HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top