07-23-2008
In the below mentioned script :
[#!/bin/ksh
Home="/tmp/Text"
Path="/abc/def"
find $Path -mtime -1 -print | xargs ls -ld > $Home # Putting latest 24 hours files in $Home
cat $Home | while read line
do
File=$(echo $line|awk '{print $4}');
if [[ -f "$File.SP" ]]
then
echo " File $File is Correct"
else
echo "File $File is Missed"
fi
]
i am checking for the files which are received in last 24 hours( almost 1000 files) in my system and they have their corresponding ".SP" file generated, if not then its a MISS.
Here i am checking 1000 files one by one that their corresponding ".SP" is generated or not. can i have any way common by which i can put this check for more than a file at a time, to minimize the run time of the script?
i mean can we parallely run multiple checks like threading??
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello experts,
I am writing an application in Solaris, which is supposed to work on PrimePower 650 and SunFire 440 machines. The application listens to the events raised by the Hardware and OS in /dev/log. The application listens to the messages logged into /dev/log and do some processing on... (3 Replies)
Discussion started by: pleaseteachmeun
3 Replies
2. SCO
Hi everyone,
I have a problem on sco unixware 7.1.4
a Ghost process is consuming cpu usage.
rtpm
cpu 0 ======---------
cpu 1 ===---------------------
cpu 2 ============================================================-----------
cpu 3 ... (1 Reply)
Discussion started by: neal.opperman
1 Replies
3. UNIX for Dummies Questions & Answers
hi,
i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies
4. AIX
Hi,
I have a problem with memory on AIX 5.3. On this server, we have JDE Edwards (ERP) and Oracle Database (9.2.0.7.0).
We have 4 Gb for physical memory and 3 Gb for paging space.
When I stop all services (JDE, Oracle and all other services), the physical memory is not free (4 Gb)
svmon... (9 Replies)
Discussion started by: tagger
9 Replies
5. Shell Programming and Scripting
Hello,
I have to create shell script being myself real novice in scripting...
I was looking on the Internet for some script examples, but I don't have the basic understanding of the shell. I was trying to do something with “ps” command without success.
For exemple total number of... (2 Replies)
Discussion started by: mr_awd
2 Replies
6. Solaris
Hello Friends,
On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization.
=========================================================================
$ prstat -a
... (4 Replies)
Discussion started by: mahive
4 Replies
7. UNIX for Advanced & Expert Users
On Linux, top shows how much % of CPU is consumed by "user" as well as "sys" like below.
Tasks: 272 total, 3 running, 268 sleeping, 0 stopped, 1 zombie
Cpu(s): 65.9%us, 33.8%sy, 0.0%ni, 0.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 16300960k total, 16212488k used, 88472k free, ... (0 Replies)
Discussion started by: gomes1333
0 Replies
8. Solaris
Hi Experts,
I have M4000 server with 132 GB Physical memory. 4 sparse zones are running under this server, which are running multiple applications. I am not getting any pointer, where swap space is getting consumed. Almost 97% of swap space is being used. I checked all /tmp (of zones as well),... (7 Replies)
Discussion started by: solaris_1977
7 Replies
9. UNIX Desktop Questions & Answers
Hi All
I am new to UNIX ,can any one please help in finding MEMORY CONSUMPTION of VLC when i use it as Streaming Server.
I need to log the memory consumption for atleast 10 hours.
Can any one help me in finding this Please (1 Reply)
Discussion started by: ravikanth17
1 Replies
10. Red Hat
Hi
please see attached picture of the TOP command.
the "java" process seem to consume 700% of cpu
is that mean that he uses 100% of every 7 cpu cores?
thanks (2 Replies)
Discussion started by: guy3145
2 Replies