Sponsored Content
Full Discussion: process CPU time
Operating Systems Solaris process CPU time Post 302557792 by pludi on Thursday 22nd of September 2011 06:06:10 AM
Old 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

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

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

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

how to know which process consume CPU time more

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

Why CPU time is longer than Elasped time?

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

How to calculate time difference between start and end time of a process!

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

Killing a process if it is not using any cpu time

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

what would a script include to find CPU's %system time high and user time high?

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

Automatically killing a process if it doesn't use any CPU time

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

CPU and memory utilization of a process, by process name

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

[Linux] How much time a process waited for CPU?

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
delay(9F)						   Kernel Functions for Drivers 						 delay(9F)

NAME
delay - delay execution for a specified number of clock ticks SYNOPSIS
#include <sys/ddi.h> void delay(clock_t ticks); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
ticks The number of clock cycles to delay. DESCRIPTION
delay() provides a mechanism for a driver to delay its execution for a given period of time. Since the speed of the clock varies among sys- tems, drivers should base their time values on microseconds and use drv_usectohz(9F) to convert microseconds into clock ticks. delay() uses timeout(9F) to schedule an internal function to be called after the specified amount of time has elapsed. delay() then waits until the function is called. Because timeout() is subject to priority inversion, drivers waiting on behalf of processes with real-time constraints should use cv_timedwait(9F) rather than delay(). delay() does not busy-wait. If busy-waiting is required, use drv_usecwait(9F). CONTEXT
delay() can be called from user and kernel contexts. EXAMPLES
Example 1: delay() Example Before a driver I/O routine allocates buffers and stores any user data in them, it checks the status of the device (line 12). If the device needs manual intervention (such as, needing to be refilled with paper), a message is displayed on the system console (line 14). The driver waits an allotted time (line 17) before repeating the procedure. 1 struct device { /* layout of physical device registers */ 2 int control; /* physical device control word */ 3 int status; /* physical device status word */ 4 short xmit_char; /* transmit character to device */ 5 }; 6 7 . . . 9 /* get device registers */ 10 register struct device *rp = ... 11 12 while (rp->status & NOPAPER) { /* while printer is out of paper */ 13 /* display message and ring bell */ /* on system console */ 14 cmn_err(CE_WARN, "^07", 15 (getminor(dev) & 0xf)); 16 /* wait one minute and try again */ 17 delay(60 * drv_usectohz(1000000)); 18 } SEE ALSO
biodone(9F), biowait(9F), cv_timedwait(9F), ddi_in_panic(9F), drv_hztousec(9F), drv_usectohz(9F), drv_usecwait(9F), timeout(9F), untime- out(9F) Writing Device Drivers SunOS 5.10 15 Oct 2001 delay(9F)
All times are GMT -4. The time now is 11:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy