09-22-2011
Most certainly bad programming from your description. This program IMO checks the directory continuously, without a delay for the required file, instead of checking every second, or waiting for an OS trigger. And no, you can't add that functionality afterwards.
But if it's so expensive, instead of asking for an update demand it, as this is certainly a bug.
This User Gave Thanks to pludi For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how to decrease priority of a particular process in time of process creation...
and also how to decrease priority of a particular process after process creation..
can any one please help me out... (2 Replies)
Discussion started by: Ramkum
2 Replies
2. 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
3. UNIX for Advanced & Expert Users
Hi,
I have problem like everyday i have to check which process consuming more cpu time. I have done it manually using top command..
Is there any script which will tell the exact process name which will consuming more time. I am using hpux. (1 Reply)
Discussion started by: rajesh08
1 Replies
4. Shell Programming and Scripting
I thought a program's elapsed time, some program language call it real time, should be the time of a program from start to finish. And it should be equal or longer than CPU time. This is true for the most of the cases. However, I do see some of my programs CPU time is longer than Elapsed time. ... (1 Reply)
Discussion started by: visio2000
1 Replies
5. Shell Programming and Scripting
Hello All,
I have a problem calculating the time difference between start and end timings...!
the timings are given by 24hr format..
Start Date : 08/05/10 12:55
End Date : 08/09/10 06:50
above values are in mm/dd/yy hh:mm format.
Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies
6. UNIX Desktop Questions & Answers
Hi i am a newbie thanks in advance
i have a process which keeps on running but doesn't use any CPU time and doesn't do the functionality which it is suppose to do .
If i kill the process and start the process again then the process kicks in and starts using CPU time and continues to do its... (3 Replies)
Discussion started by: nick1982
3 Replies
7. Shell Programming and Scripting
Hi ,
I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( .
how to find cpu's system high time and user time high in a script??
thanks , help would be appreciated !
:) (9 Replies)
Discussion started by: sushwey
9 Replies
8. UNIX Desktop Questions & Answers
Hi,
I'm new to Linux.
I have a windows server that run many processes on it.
In some cases the processes doesn't exit properly or just stop working and the process needs to be killed.
I was wondering how i can automatically (couple of times a day) check which process doesn't use any CPU... (3 Replies)
Discussion started by: ramikom
3 Replies
9. Emergency UNIX and Linux Support
Can someone please help me with a script that will help in identifying the CPU & memory usage by a process name, rather than a process id.This is to primarily analyze the consumption of resources, for performance tweaking.
G (4 Replies)
Discussion started by: ggayathri
4 Replies
10. UNIX for Advanced & Expert Users
Hi,
Is it possible in Linux to find out how much time a process waited for CPU?
In Solaris we can see it in prstat.
Thanks (1 Reply)
Discussion started by: sant
1 Replies
LEARN ABOUT OPENSOLARIS
cpc_access
cpc_access(3CPC) CPU Performance Counters Library Functions cpc_access(3CPC)
NAME
cpc_access - test access CPU performance counters
SYNOPSIS
cc [ flag... ] file... -lcpc [ library... ]
#include <libcpc.h>
int cpc_access(void);
DESCRIPTION
Access to CPU performance counters is possible only on systems where the appropriate hardware exists and is correctly configured. The
cpc_access() function must be used to determine if the hardware exists and is accessible on the platform before any of the interfaces that
use the counters are invoked.
When the hardware is available, access to the per-process counters is always allowed to the process itself, and allowed to other processes
mediated using the existing security mechanisms of /proc.
RETURN VALUES
Upon successful completion, cpc_access() returns 0. Otherwise, it returns -1 and sets errno to indicate the error.
By default, two common errno values are decoded and cause the library to print an error message using its reporting mechanism. See
cpc_seterrfn(3CPC) for a description of how this behavior can be modified.
ERRORS
The cpc_access() function will fail if:
EAGAIN Another process may be sampling system-wide CPU statistics.
ENOSYS CPU performance counters are inaccessible on this machine. This error can occur when the machine supports CPU performance coun-
ters, but some software components are missing. Check to see that all CPU Performance Counter packages have been correctly
installed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
|ATTRIBUTE TYPE |ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
SEE ALSO
cpc(3CPC), cpc_open(3CPC), cpc_seterrfn(3CPC), libcpc(3LIB), proc(4), attributes(5)
NOTES
The cpc_access() function exists for binary compatibility only. Source containing this function will not compile. This function is obsolete
and might be removed in a future release. Applications should use cpc_open(3CPC) instead.
SunOS 5.11 28 Mar 2005 cpc_access(3CPC)