PDA

View Full Version : Problem using cat to list files.



NuxIT
06-30-2006, 02:59 PM
On my resent reload of knoppix it's taking quite some time to do simple cat commands. Like when I do this: cat /var/log/syslog |tail -60
it takes a while to actually list. I ran an updatedb. I never had this problem before even when I had 128Megs on my laptop. I'm now at 256MEGS.

So, I'm wondering what might be causing the delay and what the linux equivalent of a scandisk/defrag is. Thanks

NuxIT
07-01-2006, 04:14 AM
Well, I noticed I only get the delay when issuing the tail command. Doesn't seem to happen when doing a regular cat. Anyways, you guys are going to make me search for how to do defrags/scandisk in linux huh.. Ok, it's either that our go to the responsive linux forums. I kid , I kid.. Or do I? :evil:

Harry Kuhman
07-01-2006, 04:30 AM
Which do you wish to defrag - the Knoppix Live CD or the Knoppix Live DVD?

UnderScore
07-01-2006, 05:42 AM
Assuming you have enough free HD space, the linux filesystems will usually "defrag" in the background during non I/O times and will reallocate blocks of data to make the files in the filesystem contiguous. It is only when it is running out of space that it will fragment a file into non-contiguous pieces. Thus a defrag for linux filesystems is practically unnecessary and for most linux filesystems can not actually be done.
Some starting points in investigating linux performance ... dmesg, iostat, vmstat, hdparm, bonnie, sar.

NuxIT
07-01-2006, 12:11 PM
Harry, sorry I didn't make it clear that I had an HDD install. And thanks for the explaination of how the file system works for linux UnderScore. Have a good one guys.

Harry Kuhman
07-01-2006, 02:26 PM
That was kind of my point. You have been here since at least April so you should know your way around the forums. You are complaining about a lack of response, but you didn't even post a question about a hard disk install in the hard disk install forum.