LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-10-2011, 10:52 PM   #1
chobong
Member
 
Registered: Jan 2010
Posts: 90

Rep: Reputation: 15
Load average too high


Dear All,

I wrote a script to extract and get the the name of *.gz in a foler . Since running that script every 10 minutes, load average on my server increases more than 10.
I checked with 'top' and it showed many D process ...

Quote:
[myserver]# top
...
15121 root 16 0 0 0 0 D 0.0 0.0 0:00.00 basename
8049 root 16 0 0 0 0 D 0.0 0.0 0:00.00 basename
28875 root 25 0 0 0 0 D 0.0 0.0 0:00.00 basename
29008 root 16 0 0 0 0 D 0.0 0.0 0:00.00 basename
19404 root 25 0 0 0 0 D 0.0 0.0 0:00.00 basename
...
Here is my script
Quote:
#!/bin/sh
cd /myfolder
for f in *.gz; do
file=$(basename "$f" .gz)
gunzip -c "${f}" > /home/tmp/$file
done
And my folder has a lot of *.gz file. (about 400 files)
Could you please help me to check my script?
Thanks a lot!

Last edited by chobong; 08-10-2011 at 11:16 PM.
 
Old 08-11-2011, 01:58 AM   #2
Nick_Minter
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Rep: Reputation: Disabled
Hi Chobong,

I've looked at the script and it should be functioning as should be expected.

Can you provide some further information:

* Size of files in question
* Length of filenames
* number of files that are being processed

Regards,
Nick.
 
Old 08-11-2011, 02:38 AM   #3
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks for your reply, Nick

-Size of files: less than 1 MB for each file (4M for all files)
-Length of filenames: this is log files of amazon-ec2, files have the same format like this
xxxxxxxxxxxxxx.2011-08-01-08.qVcTdHH1.gz
- Number of files: about 370 files and it will be increased when script run..

Do you have any idea for this problem?

Last edited by chobong; 08-11-2011 at 03:21 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
load average high in Suse 10.3 and 11.3 deepaksoni SUSE / openSUSE 0 10-06-2010 12:55 AM
Load Average is high (Ubuntu 9.0) KinnowGrower Linux - Laptop and Netbook 7 05-19-2010 12:45 AM
High load average investigation wmasry Linux - Newbie 8 02-10-2010 01:29 PM
load average high sang_froid Linux - Server 3 12-14-2009 11:18 AM
Load average stay as high as around 1.00 lawrence_lee_lee Linux - Software 2 09-10-2008 02:22 AM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration