05-07-2009
Thanks for the assistance from both of you.
As I understand it, the "do while var1 var2 ..."
just assigns variables, while reading through a file, correct? And you can then substitute those variables later.
I saw another example [following your advice of researching more myself] where I see that I can specifically assign the variables.
So, it can be like "u=user1 w=stop1.script v=start1.script"
it was something with grouping, and you could assign all your variables in one line. Something like that. Obviously, I suspect that you understand this a lot better than I do.
Thanks. You've opened my eyes. I hope to begin testing today. Hopefully the admin isn't insecure about his job to not show me how he schedules the cron tasks! ... If I have issues with that, though, I'll try to read more FIRST, so my question will be a bit more knowledgeable, and show more effort on my part, instead of asking for a spoon fed, step-by-step answer.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi.
I write a shell script for import data to oracle using sql loader.
I set permission 755 or 777 for that script. I can run that script in the consol okay.
When I call it from PHP using system command. I got return value 126 this value when don't have permission right ?
I check step... (2 Replies)
Discussion started by: raccsdl
2 Replies
2. Shell Programming and Scripting
One of our servers runs Solaris 8 and does not have "ls -lh" as a valid command. I wrote the following script to make the ls output easier to read and emulate "ls -lh" functionality. The script works, but it is slow when executed on a directory that contains a large number of files. Can anyone make... (10 Replies)
Discussion started by: shew01
10 Replies
3. UNIX for Dummies Questions & Answers
My shell script runs fine both as a cron job and when i issue it.
However, I wish to differentiate when it runs as a cron-job so the "echo" statements are not issued (they get mailed to me, which i don't want).
I tried checking $USER but since the cron was created in my user that does not... (5 Replies)
Discussion started by: sentinel
5 Replies
4. Shell Programming and Scripting
Hi
I have the following script :
#!/bin/ksh
#################### Function macAddressFinder ########################
macAddressFinder()
{
`ifconfig -a > ipInterfaces`
`cat ipInterfaces`
}
#######################################################################
#
#
print... (2 Replies)
Discussion started by: presul
2 Replies
5. Shell Programming and Scripting
Hi,shell script is scheduled from maestro and we want mastero should not run shell script so can we edit the shell script so that it should run.ThanksPrakash (5 Replies)
Discussion started by: prakashdba2010
5 Replies
6. Shell Programming and Scripting
I have this little bash script I use to transcode mkv files using handbrake.
#!/bin/bash
sourcedir="/media/raid10/video/to_be_encoded_series"
destdir="/media/raid10/video/series"
cd "$sourcedir"
for i in *.mkv; do
HandBrakeCLI -i "$i" -o "$destdir/${i%.*}.mkv" -e x264 -q 20.0 -E copy -B... (4 Replies)
Discussion started by: barrydocks
4 Replies
7. Shell Programming and Scripting
Hi everyone,
I wrote a script that is supposed to be run by cron on a daily basis. It works just fine if I run it manually, but due to a lack of environment variables (which are available during my user session but not when cron runs the script) it keeps failing to run successfully.
Here's the... (2 Replies)
Discussion started by: gacanepa
2 Replies
8. AIX
My first post evidently did not materialize so I posted it again:
Runnning a cron job every 5 mins to send data files to a state facility.
My original cron entry at worked fine:
01,06,11,16,21,26,31,36,41,46,51,56 * * * * /home/sftpuser/stateinoc-from-appname.ksh
Somewhere I have a... (1 Reply)
Discussion started by: Skyybugg
1 Replies
9. Shell Programming and Scripting
I've created a tag in the makefile:
mytag: $(shell ${PWD}/script.sh)
When i do: make clean - the script is executed
When i perform make or make mytag the script is again executed with the output:
make: Nothing to be done for mytag
What i want ?
I want script.sh to be executed only... (0 Replies)
Discussion started by: Pufo
0 Replies
10. Shell Programming and Scripting
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
SSTAT(1) Slurm components SSTAT(1)
NAME
sstat - Display various status information of a running job/step.
SYNOPSIS
sstat [OPTIONS...]
DESCRIPTION
Status information for running jobs invoked with SLURM.
The sstat command displays job status information for your analysis. The sstat command displays information pertaining to CPU, Task, Node,
Resident Set Size (RSS) and Virtual Memory (VM). You can tailor the output with the use of the --fields= option to specify the fields to
be shown.
For the root user, the sstat command displays job status data for any job running on the system.
For the non-root user, the sstat output is limited to the user's jobs.
Note: the sstat command requires that the jobacct_gather plugin be installed and operational.
-a, --allsteps
Print all steps for the given job(s) when no step is specified.
-e, --helpformat
Print a list of fields that can be specified with the '--format' option.
-h, --help
Displays a general help message.
-i, --pidformat
Predefined format to list the pids running for each job step. (JobId,Nodes,Pids)
-j, --jobs
Format is <job(.step)>. Stat this job step or comma-separated list of job steps. This option is required. The step portion will
default to lowest step running if not specified, unless the --allsteps flag is set where not specifying a step will result in all
running steps to be displayed. NOTE: A step id of 'batch' will display the information about the batch step.
-n, --noheader
No heading will be added to the output. The default action is to display a header.
-o, --format, --fields
Comma separated list of fields. (use '--helpformat' for a list of available fields).
NOTE: When using the format option for listing various fields you can put a %NUMBER afterwards to specify how many characters should
be printed.
i.e. format=name%30 will print 30 characters of field name right justified. A -30 will print 30 characters left justified.
-p, --parsable
output will be '|' delimited with a '|' at the end
-P, --parsable2
output will be '|' delimited without a '|' at the end
--usage
Display a command usage summary.
-v, --verbose
Primarily for debugging purposes, report the state of various variables during processing.
-V, --version
Print version.
Job Status Fields
The following are the field options:
AveCPU Average (system + user) CPU time of all tasks in job.
AvePages
Average number of page faults of all tasks in job.
AveRSS Average resident set size of all tasks in job.
AveVMSize
Average Virtual Memory size of all tasks in job.
JobID The number of the job or job step. It is in the form: job.jobstep.
MaxPages
Maximum number of page faults of all tasks in job.
MaxPagesNode
The node on which the maxpages occurred.
MaxPagesTask
The task ID where the maxpages occurred.
MaxRSS Maximum resident set size of all tasks in job.
MaxRSSNode
The node on which the maxrss occurred.
MaxRSSTask
The task ID where the maxrss occurred.
MaxVMSize
Maximum Virtual Memory size of all tasks in job.
MaxVMSizeNode
The node on which the maxvsize occurred.
MaxVMSizeTask
The task ID where the maxvsize occurred.
MinCPU Minimum (system + user) CPU time of all tasks in job.
MinCPUNode
The node on which the mincpu occurred.
MinCPUTask
The task ID where the mincpu occurred.
NTasks Total number of tasks in a job or step.
EXAMPLES
sstat --format=AveCPU,AvePages,AveRSS,AveVMSize,JobID -j 11
25:02.000 0K 1.37M 5.93M 9.0
sstat -p --format=AveCPU,AvePages,AveRSS,AveVMSize,JobID -j 11
25:02.000|0K|1.37M|5.93M|9.0|
COPYING
Copyright (C) 2009 Lawrence Livermore National Security. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
CODE-OCEC-09-009. All rights reserved.
This file is part of SLURM, a resource management program. For details, see <http://www.schedmd.com/slurmdocs/>.
SLURM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any later version.
SLURM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
SEE ALSO
sacct(1)
sstat 2.3 August 2011 SSTAT(1)