12-01-2011
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
How do I pass the password from a csh script when I su to a different user ? ( Root is not running this script )
Thanks (1 Reply)
Discussion started by: ayeger
1 Replies
2. Shell Programming and Scripting
This code is in my 'case' statement and it all else works fine.
The problem I have is that the value in 'procno' is not passed on to the external program (fireit).
It is passing all zeros instead of the actual process number.
By the time I get to this case statement, I know the "Number" and... (1 Reply)
Discussion started by: giannicello
1 Replies
3. Shell Programming and Scripting
Hi Friends,
Could you pleas help me out..
I have an awk program which works fine while running it in the command prompt.
The awk program is
===============
awk 'BEGIN {
format="head -%d M2_Sales_N01.txt |tail -%d >M2_Sales_N01_%02d.txt\n"
n=0
m=0
}
{
if (n==0)
{
tmp=$1
n=1
}... (5 Replies)
Discussion started by: bikas_jena
5 Replies
4. Shell Programming and Scripting
Hi,
I am able to do this by brute force but I am just curious if there is a better way of handling things. Basically the scenario is something like this:
There are a number of files in a directory:
rib.20071224.1759.gz 24-Dec-2007 17:59 132K
rib.20071224.1959.gz 24-Dec-2007... (7 Replies)
Discussion started by: Legend986
7 Replies
5. UNIX for Dummies Questions & Answers
I have a question
I have like 19 different list which contains the name of the server but what I need is just unique ones.
First thing I need to do is just make a unique list within the list itself
i.e. delete anything that is repeated inside the list
like for example
in list1
i... (1 Reply)
Discussion started by: pareshan
1 Replies
6. Shell Programming and Scripting
Hi all,
I have a list of times:
...10:02
15:34
20:05
01:51
06:55
09:00
05:52...
That's just part of the list (its huge).
How do I go about selecting certain times, e.g. just between 23:00 and 05:00 ?? (4 Replies)
Discussion started by: mikejreading
4 Replies
7. Shell Programming and Scripting
Hi all,
I have the following question. Apparently not very difficult, but I'm not any expert.
I have a program, let's say program.x, and a bash script that execute it, let's say program.sh. When the program executes it asks for a value to continue. What I want is just passing the value throw... (2 Replies)
Discussion started by: josegr
2 Replies
8. Shell Programming and Scripting
I have a program which I can run on the command line like below and works fine
/nethome/chrisd/HSeis/TommyCD/TommyCD-1101/bin/raytrac vmod=npt10-z30.vmod srfile=jcdint.sc rcfile=jcdint.rc phases="SP FS" level=twop format="X T" dtau=0.1 mdacc=0.5 mindist=0.1 maxitertp=25 ray=npt10-z30.ry... (0 Replies)
Discussion started by: kristinu
0 Replies
9. Shell Programming and Scripting
I have noticed this thing using csh when passing arguments
Suppose I call a csh script using
../Scripts/plot-model.csh -vmod="npt02-z30.vmod" -R="0/80/0/30" -c="0/4.5" -aspr="1:10"
Somehow the " get removed when doing
$argv
ending up with
-vmod=npt02-z30.vmod... (0 Replies)
Discussion started by: kristinu
0 Replies
10. Programming
Hi friends,
I have a small query, hope u will help me with it.
I want to write a small program which would take an integer as an argument, then I want to save that argument in a variable of type int. Could you please help me with it. Here is my program
#include <stdio.h>
int main(int... (4 Replies)
Discussion started by: gabam
4 Replies
ionice(1) General Commands Manual ionice(1)
NAME
ionice - get/set program io scheduling class and priority
SYNOPSIS
ionice [[-c class] [-n classdata] [-t]] -p PID [PID]...
ionice [-c class] [-n classdata] [-t] COMMAND [ARG]...
DESCRIPTION
This program sets or gets the io scheduling class and priority for a program. If no arguments or just -p is given, ionice will query the
current io scheduling class and priority for that process.
As of this writing, a process can be in one of three scheduling classes:
Idle A program running with idle io priority will only get disk time when no other program has asked for disk io for a defined grace
period. The impact of idle io processes on normal system activity should be zero. This scheduling class does not take a priority
argument. Presently, this scheduling class is permitted for an ordinary user (since kernel 2.6.25).
Best effort
This is the effective scheduling class for any process that has not asked for a specific io priority. This class takes a priority
argument from 0-7, with lower number being higher priority. Programs running at the same best effort priority are served in a round-
robin fashion.
Note that before kernel 2.6.26 a process that has not asked for an io priority formally uses "none" as scheduling class, but the io
scheduler will treat such processes as if it were in the best effort class. The priority within the best effort class will be dynam-
ically derived from the cpu nice level of the process: io_priority = (cpu_nice + 20) / 5.
For kernels after 2.6.26 with CFQ io scheduler a process that has not asked for an io priority inherits CPU scheduling class. The
io priority is derived from the cpu nice level of the process (same as before kernel 2.6.26).
Real time
The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class
needs to be used with some care, as it can starve other processes. As with the best effort class, 8 priority levels are defined
denoting how big a time slice a given process will receive on each scheduling window. This scheduling class is not permitted for an
ordinary (i.e., non-root) user.
OPTIONS
-c class
The scheduling class. 0 for none, 1 for real time, 2 for best-effort, 3 for idle.
-n classdata
The scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, 0-7 is
valid data.
-p pid Pass in process PID(s) to view or change already running processes. If this argument is not given, ionice will run the listed pro-
gram with the given parameters.
-t Ignore failure to set requested priority. If COMMAND or PID(s) is specified, run it even in case it was not possible to set desired
scheduling priority, what can happen due to insufficient privileges or old kernel version.
EXAMPLES
# ionice -c 3 -p 89
Sets process with PID 89 as an idle io process.
# ionice -c 2 -n 0 bash
Runs 'bash' as a best-effort program with highest priority.
# ionice -p 89 91
Prints the class and priority of the processes with PID 89 and 91.
NOTES
Linux supports io scheduling priorities and classes since 2.6.13 with the CFQ io scheduler.
AUTHORS
Jens Axboe <jens@axboe.dk>
AVAILABILITY
The ionice command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
ionice August 2005 ionice(1)