10-31-2009
Are the variables $year, $month and $day actually set (i.e. otherwise you're generating a report based on possibly every *.TLG file)?
Yes the variables are right. I have checked it again and for sure I am not searching in the whole *.TLG
How big is each TLG file?
The size of each file is not fixed, it depends on the traffic during that hour, sometimes rhe size is 100KB and sometimes it might be over 600KB.
Are you saying that the CPU usage is low until you run the script?
The CPU is fine until you start the script. Before starting the script, if you check CPU load through vmstat command, you will find the idle value varies between 85 & 96%, once the script is started, the idle value drops to 0
Does the script finish at all? Is file.txt created? Does it contain the correct data?
The script is generating the file successfully. One thing to be noted here, is that the same line of this script will have to run in 6 different directories, since I have different 26 files *.TLG generated in 6 different directories.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
If unix says my cpu load is 2.15 exactly what does that mean?
--Jason (1 Reply)
Discussion started by: Mac J
1 Replies
2. AIX
after a long period of running, the network application's CPU load in our syst em increase slowly, the failed at the end. we use "truss" tool to trace the process, found that it processes something like "semop" ,"semctl","thread_waitlock","kread" kernel call . The trace log file looks like the... (0 Replies)
Discussion started by: Frank2004
0 Replies
3. Red Hat
Hi Buddies,
Thanx for reading my first post...
After googling a lot and searching so many forums I am feeling down a bit...
Please don't mind my ignorence, and my grammer ... :)
My server is running RHEL 2.6.9-5.EL. The cpu load is going higher than roof, almost 100 sometimes.
I am... (2 Replies)
Discussion started by: squid04
2 Replies
4. Linux
Hi ALL,
I have to develop a script which checks for the load on CPU on regular intervals. I created a simple script which uses 'uptime' command to find out the avg load in the last 5 min. I then used grep and put the value of the avg load in a variable OUT.
It was working fine till... (5 Replies)
Discussion started by: vikings.svnit
5 Replies
5. Solaris
Friends
I have noticed that the Sun Fire v490 server with Solaris9 OS in my office, is showing a load of 12.50 during peak time and the CPU showing a max of 75% and an average of 60%.
The Application running in this machine hung last month(For reasons unknown) and is running fine after... (5 Replies)
Discussion started by: Renjesh
5 Replies
6. Shell Programming and Scripting
can someone suggest me some code in any language that will increase CPU and memory both. (3 Replies)
Discussion started by: learnbash
3 Replies
7. UNIX for Dummies Questions & Answers
Hi, I'm John_giova and I'm new in this Forum. Sorry my english, it's not my first language.
So, I'm trying to check the CPU utlization during the video encoding and decoding (making a comparison between SW and HW ) using the SAR tool. According to a past thread I saw as CPU utilization I should... (4 Replies)
Discussion started by: John_giova
4 Replies
8. Solaris
need to capture the following data on an hourly basis without cronjob scheduling in Solaris 5.10/5.11:-
1. load averages
2. Total no. of processes.
3. CPU state
4. Memory
5. Top 3 process details.
any other third-party tool is available? (7 Replies)
Discussion started by: thoranam
7 Replies
9. Ubuntu
Hello,
What I wish to succeed is to setup loadbalancing between two dedicated servers. Here is my case:
=======================================================================================================
LB IP (Just an IP address): Provided by hosting company (11.22.33.44) Hosting company... (1 Reply)
Discussion started by: baris35
1 Replies
10. Solaris
Hi all,
Been reading a lot of the cpu load and its "analogy of it to car traffic path of expressway"
From wiki
Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux also includes processes in uninterruptible sleep states... (13 Replies)
Discussion started by: javanoob
13 Replies
LEARN ABOUT CENTOS
service
service(8) System Manager's Manual service(8)
NAME
service - run a System V init script
SYNOPSIS
service SCRIPT COMMAND [OPTIONS]
service --status-all
service --help | -h | --version
DESCRIPTION
service runs a System V init script in as predictable environment as possible, removing most environment variables and with current working
directory set to /.
The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT. The supported values of COMMAND depend on the
invoked script, service passes COMMAND and OPTIONS it to the init script unmodified. All scripts should support at least the start and
stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start
command.
service --status-all runs all init scripts, in alphabetical order, with the status command.
If the init script file does not exist, the script tries to use legacy actions. If there is no suitable legacy action found and COMMAND is
one of actions specified in LSB Core Specification, input is redirected to the systemctl. Otherwise the command fails with return code 2.
FILES
/etc/init.d
The directory containing System V init scripts.
ENVIRONMENT
LANG, TERM
The only environment variables passed to the init scripts.
SEE ALSO
chkconfig(8), ntsysv(8), systemd(1), systemctl(8), systemd.service(5)
Jan 2006 service(8)