02-15-2006
is there a way to tell the difference between a rnuaway process and one that is legitimate?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In a korn shell script, how can I run several processes in parallel at the same time?
For example, I have 3 processes say p1, p2, p3
if I call them as
p1.ksh
p2.ksh
p3.ksh
they will run after one process finishes. But I want to run them in parallel and want to display "Process p1... (3 Replies)
Discussion started by: sbasak
3 Replies
2. UNIX for Advanced & Expert Users
I am in a multi-user Linux environment at work. Other users easily run processes on my machine when my machine is idle, but when I try to use my machine, it is dead slow. The processes run by them always grab the top spot using 99% of my CPU time. Is there a way I can prevent others to run... (3 Replies)
Discussion started by: besharam
3 Replies
3. Programming
How can i run a back ground process....
I.e for example by using fork() i need to run seperate 4 background processes..
How can send a process to background
??? (9 Replies)
Discussion started by: ugp
9 Replies
4. UNIX for Advanced & Expert Users
Hi,
Would like to ask the experts if anyone knows how to run a script like this:
dtterm -title shell1
run process1 on shell1
dtterm -title shell2
run process2 on shell2
cheers!
p/s: sorry if i used the wrong forum, quite concussed after watching world cup for several nights; but I... (2 Replies)
Discussion started by: mochi
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I'm a newbie when it comes to using UNIX, and I'm hoping someone here can help me out. I have a set of processes that I want to run sequentially:
process1.py
process2.py
process3.py
I want to know I can run these sequentially using their process IDs (PIDs). Ideally, I want to... (2 Replies)
Discussion started by: shelata
2 Replies
6. Shell Programming and Scripting
how can I kill my processes which are run by hacker or another person who log in with my username and password (1 Reply)
Discussion started by: thsecmaniac
1 Replies
7. UNIX and Linux Applications
I would like to call a function called CIRCLE which is further beind called by other function but in a loop that CIRCLE fuction is being called. And this CIRCLE function starts another process which takes 3 hours to complete again, if i put that process in nohup &, I can go to the next command... (2 Replies)
Discussion started by: venugopalsmartb
2 Replies
8. Solaris
hi all,
I'm working Solaris 5.10 (5.10 Generic_137137-09 sun4u sparc SUNW,SPARC-E nterprise)
Few days ago, my junior engineer made a mistake! He is execute shutdown command on the live server. He mis understand between live and test servers! :wall:
The live... (0 Replies)
Discussion started by: buyantugs
0 Replies
9. UNIX for Dummies Questions & Answers
Is there any limit in UNIX that only a MAXIMUM no of processes can run at a time? If so, it exceeds then what would be the error we would receive? (4 Replies)
Discussion started by: jansat
4 Replies
10. Shell Programming and Scripting
Hello,
I need to run multiple shell processes simultaneously and output of the first process shall be the input of the second process but first process is never ending so both should be running in parallel. I do not wish to wait the end of the first process. I am under ubuntu 16.04.
... (3 Replies)
Discussion started by: baris35
3 Replies
LEARN ABOUT OPENDARWIN
setpriority
GETPRIORITY(2) BSD System Calls Manual GETPRIORITY(2)
NAME
getpriority, setpriority -- get/set program scheduling priority
SYNOPSIS
#include <sys/time.h>
#include <sys/resource.h>
int
getpriority(int which, int who);
int
setpriority(int which, int who, int prio);
DESCRIPTION
The scheduling priority of the process, process group, or user, as indicated by which and who is obtained with the getpriority() call and set
with the setpriority() call. Which is one of PRIO_PROCESS, PRIO_PGRP, or PRIO_USER, and who is interpreted relative to which (a process
identifier for PRIO_PROCESS, process group identifier for PRIO_PGRP, and a user ID for PRIO_USER). A zero value of who denotes the current
process, process group, or user. Prio is a value in the range -20 to 20. The default priority is 0; lower priorities cause more favorable
scheduling.
The getpriority() call returns the highest priority (lowest numerical value) enjoyed by any of the specified processes. The setpriority()
call sets the priorities of all of the specified processes to the specified value. Only the super-user may lower priorities.
RETURN VALUES
Since getpriority() can legitimately return the value -1, it is necessary to clear the external variable errno prior to the call, then check
it afterward to determine if a -1 is an error or a legitimate value. The setpriority() call returns 0 if there is no error, or -1 if there
is.
ERRORS
Getpriority() and setpriority() will fail if:
[ESRCH] No process was located using the which and who values specified.
[EINVAL] Which was not one of PRIO_PROCESS, PRIO_PGRP, or PRIO_USER.
In addition to the errors indicated above, setpriority() will fail if:
[EPERM] A process was located, but neither its effective nor real user ID matched the effective user ID of the caller.
[EACCES] A non super-user attempted to lower a process priority.
SEE ALSO
nice(1), fork(2), renice(8)
HISTORY
The getpriority() function call appeared in 4.2BSD.
4th Berkeley Distribution June 4, 1993 4th Berkeley Distribution