03-05-2010
need a simple bash script
to gather the cpu utilization from a system in 5 minute intervals and direct output to file.
I'm new at scripting and while this seems like an easy task I'm confused on where to start. thanks for any help
Last edited by mkeyes001; 03-05-2010 at 12:34 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm sure I'm doing something wrong but as I am new to bash shell scripting I'm not sure what:
Here's the code
webalizer.conf is sitting in the same directory as this file which is named webalizer.sh. Can someone tell me if I've got the syntax right -- it that's correct? I'm executing the... (3 Replies)
Discussion started by: xaphalanx
3 Replies
2. Shell Programming and Scripting
Hi guys, I'm new to the forum so forgive me if I'm sounding ... daft.
I currently work in a Tech Support role. Every day we have to generate data by running around 10 .sh scripts. I was thinking instead of having to ./filename 10 times is it possible to right a new script that will run these for... (16 Replies)
Discussion started by: JayC89
16 Replies
3. Shell Programming and Scripting
I am writing a shell script in bash one of the thing I want to show is size of export /home
du -sk /export/home/oracle | cut -c 1-5
echo "kbytes"
when I run the script kbytes shows up in the second line, How can I append kbytes on the same line, such as
61233 kbytes
please guide
thanks (2 Replies)
Discussion started by: Tirmazi
2 Replies
4. Shell Programming and Scripting
So I need a script that does the following:
If a certain user is logged in
Run `command`
Else
Echo “incorrect user”
This is my first stab...which doesn't work:
#!/bin/bash
X="user=`ls -l /dev/console | cut -d " " -f 4`"
Y="foobar"
echo $X
echo $Y (4 Replies)
Discussion started by: doubleminus
4 Replies
5. Shell Programming and Scripting
I have a bash script, but it needs to have a simple protection with password.
So if a user wants to run the script , there should be a kdialog to asks for a password.If the password is correct the script starts to run.
It should not be the passord of root or another admin user.Just a password in... (2 Replies)
Discussion started by: poort
2 Replies
6. Shell Programming and Scripting
I want to write a bash script to:
1. Send an email from localhost to an external gmail account. (gmail then automatically forwards the message back to a pop account on the same server.
2. Script waits 3 minutes then checks to see if the email arrived, and if not, it sends an email to... (9 Replies)
Discussion started by: sallyanne
9 Replies
7. Shell Programming and Scripting
Hi to everyone here,
I'm a new user and relatively-new linuxer.
I'm trying to write a script that checks if every file from a directory is present in a given list and if not, delete it.
should be simple. But I think I've done half the work only:
this is to create the reference list:
for c... (2 Replies)
Discussion started by: dentex
2 Replies
8. Shell Programming and Scripting
Hello All,
First and foremost, if I have posted this question in the wrong forum/section, I apologize.
Okay so here is my dilemma. I have written a BASH script that automatically restarts a tomcat on a given server. That part was simple enough. However, now I would like to not only restart... (14 Replies)
Discussion started by: UNM_Lobo
14 Replies
9. Shell Programming and Scripting
Hello all!
This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician.
Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix:
... (16 Replies)
Discussion started by: torchij
16 Replies
10. Shell Programming and Scripting
I've put together a very simple bash script to check for software patches and bounce the server, once complete. This is on a Mac server. The script works just fine upon execution, however, cron responds with:
/bin/sh: /usr/local/bin/softwareupdates.sh: No such file or directory
Crontab:
... (6 Replies)
Discussion started by: Nvizn
6 Replies
LEARN ABOUT DEBIAN
pvm_advise
ADVISE(3PVM) PVM Version 3.4 ADVISE(3PVM)
NAME
pvm_advise() - Controls use of direct task-to-task routing.
[In Version 3.2: Replaced by pvm_setopt]
SYNOPSIS
C int info = pvm_advise( int route )
Fortran call pvmfadvise( route, info )
PARAMETERS
route Integer advising PVM to set up direct task-to-task links.
route options
PvmDontRoute 1 Don't allow direct links to this task
PvmAllowDirect 2 Allow but don't request direct links
PvmRouteDirect 3 Request direct links
info Integer returning error status.
DESCRIPTION
The routine pvm_advise advises PVM on whether or not to set up direct task-to-task links (using TCP) for all subsequent communication. Once
a link is established it remains until the application finishes. If a direct link can not be established because one of the two tasks has
requested PvmDontRoute or because no resources are available, then the default route through the PVM daemons is used. pvm_advise can be
called multiple times to selectively establish direct links, but is typically set only once near the beginning of each task. PvmAllowDi-
rect is the default advise setting. This setting on task A allows other tasks to set up direct links to A. Once a direct link is estab-
lished between tasks both tasks will use it for sending messages. pvm_advise returns the error status in info. The performance of direct
task-to-task links can be up to a factor of two better than the default route. The draw back is a lack of scalability of the direct links.
Some versions of UNIX limit the number of links to no more than 30.
EXAMPLES
C:
info = pvm_advise( PvmRouteDirect );
Fortran:
CALL PVMFADVISE( PVMROUTEDIRECT, INFO )
ERRORS
This error condition can be returned by pvm_advise
PvmBadParam
giving an invalid route value.
SEE ALSO
pvm_setopt(3PVM)
30 August, 1993 ADVISE(3PVM)