06-26-2013
Help in making a basic bash script
Hi All,
I am trying to monitor CPU load of few processes, with the same name.
The output that I get from top is the following
28171 root 20 0 1089m 21m 3608 S 103 0.3 15:16.89 /opt/ppp//h264rtptranscoder.bin --videoPort=14504 --audioPort=14505
27589 root 20 0 1060m 23m 3548 S 94 0.3 35:16.57 /opt/ppp/h264rtptranscoder.bin --videoPort=14500 --audioPort=14501
The problem I see here is that top reports my CPU utilisation per core, not avg.
I wanna put the avg load for each process in a nice graph in zabbix.
Anyone who did it before ?
Last edited by liviusbr; 06-26-2013 at 07:08 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm on SunOS 5.8.
I'm not sure of the exact terminology, but I want to make a "remote mount" from my server to another server. (Basically I want to create one of the mount points on my server be a shared volume that's on another server here). So if I do a df -k, I want to see all of the volumes... (1 Reply)
Discussion started by: FredSmith
1 Replies
2. Shell Programming and Scripting
Hello once again:
One thing that seems to be a nice feature is a progress gauge... so I can see how long an operation will take for a task to complete if it is requiring a lot of processing or the file is enormous. I have seen references to gauge operations, but I don't know anything about it or... (1 Reply)
Discussion started by: ccox85
1 Replies
3. UNIX for Dummies Questions & Answers
Hello there
Been using Unix bash scripting for two days now so am very new to this. I am currently doing a project now and i'm basically making a noughts and crosses game (or tic tac toe).
I have created the board using an array. When I try and check to see if the array is empty using an If... (3 Replies)
Discussion started by: ChrisHoogie
3 Replies
4. Shell Programming and Scripting
ok basically im trying to count how many people fail a class by comparing there grade by -gt 49
i tried putting a count inside the while loop but i know you cant access a count outside a subshell. is there an easy way to count the number of failures?
declare -i failcount=0
awk... (2 Replies)
Discussion started by: nilekyle
2 Replies
5. 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
6. Shell Programming and Scripting
Here's the assignment. I'll bold the parts that are rough for me. Unfortunately, that's quite a bit lol. The syntax is, of course, where my issues lie, for the most part. I don't have a lot of programming experience at all :/. I'd post what I've already done, but I'm so lost I really don't know... (1 Reply)
Discussion started by: twk101
1 Replies
7. Shell Programming and Scripting
I am working with autodock vina for virtual screening and docking with cygwin. Autodock vina generates conformers for multiple ligands. I want to make the complex of these conformers with receptor. e.g. I have 100 .pdbqt files form vina output and one receptor pdbqt file. By running command-
cut... (1 Reply)
Discussion started by: Rajesh Patil
1 Replies
8. Shell Programming and Scripting
Does it possible to make some bash script automatic to be a executable when transfered to another pc...? (5 Replies)
Discussion started by: tomislav91
5 Replies
9. UNIX for Beginners Questions & Answers
Hi everyone, first time visitor to these forums here.
Keeping a long story short I've been attempting to learn how to code in bash. I have VERY little previous experience with coding languages besides simply copying and pasting batch scripts for Windows. So, with that in mind I've followed a... (4 Replies)
Discussion started by: Meta
4 Replies
10. Shell Programming and Scripting
I am not able to execute bash script on Fedora. They were running on another environment. This is a sample script:
#!/usr/bin/bash
input="./data/heu/hout1"
i=1
j=0
while IFS= read -r file1
do
#Some code here
done < "$input"
#echo $j
I get an error:
bash: s.sh: command not... (3 Replies)
Discussion started by: ngabrani
3 Replies
LEARN ABOUT MOJAVE
topsyscall
topsyscall(1m) USER COMMANDS topsyscall(1m)
NAME
topsyscall - top syscalls by syscall name. Uses DTrace.
SYNOPSIS
topsyscall [-Cs] [interval [count]]
DESCRIPTION
This program continually prints a report of the top system calls, and refreshes the display every 1 second or as specified at the command
line.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS
-C don't clear the screen
-s print per second values
EXAMPLES
Default output, 1 second updates,
# topsyscall
Print every 5 seconds,
# topsyscall 5
Print a scrolling output,
# topsyscall -C
FIELDS
load avg
load averages, see uptime(1)
syscalls
total syscalls in this interval
syscalls/s
syscalls per second
SYSCALL
system call name
COUNT total syscalls in this interval
COUNT/s
syscalls per second
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
topsyscall will run until Ctrl-C is hit, or the specified interval is reached.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO
dtrace(1M), prstat(1M)
version 0.90 Jun 13, 2005 topsyscall(1m)