12-07-2009
run two snoops commands simultaneaously
I am looking for a little script that would run a snoop command on 2 different interfaces at the same time.
snoop -d qfe1 /tmp/snooper1
snoop -d qfe3 /tmp/snooper2
Or is there a way, we can have these 2 commands run at the command line in parallel? where a CTRL-C will break out of both commands at the same time?
Thanks,
10 More Discussions You Might Find Interesting
1. IP Networking
Hi
I'm trying to automatically run a command on a UNIX (AIX) machine from a Windows NT 4 machine. I can do this manually using the 'rexec' or 'rsh' command but I need an automatic login (on the AIX). In the manual I've found that there should be a '.rhosts' file on the Unix machine in the... (1 Reply)
Discussion started by: Mark Detrez
1 Replies
2. UNIX for Dummies Questions & Answers
What would be the best way to setup for a Linux box to run a few commands before the user logs in? (1 Reply)
Discussion started by: woofie
1 Replies
3. Shell Programming and Scripting
I have a question of how to run commands from a variable where there are more than one commands in the variable under bash.
I ran the following commands under bash
> command="ls /etc/zshrc; ls /etc/zshenv"
> $command
The results were:
ls: /etc/zshrc;: No such file or directory
ls: ls:... (1 Reply)
Discussion started by: pankai
1 Replies
4. UNIX for Dummies Questions & Answers
It would be helpful if someone could help me out here. The problem I have been having is that I cannot run some commands which are valid - whenever I try to run the command I get the message "command not found". Now, if I run the same command as root it executes. These commands do not have to be... (5 Replies)
Discussion started by: BigTool4u2
5 Replies
5. Shell Programming and Scripting
Hello guys, I am new at shell scripting and I want to create a script that runs several commands at a time, ie: uptime, w, df -h and so on and send the output of this commands to a text file so it can be send via email at a certain time using crontab.
Any help will be much appreciated! (4 Replies)
Discussion started by: agasamapetilon
4 Replies
6. Shell Programming and Scripting
I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies
7. Solaris
Hi,
I want to run 2 snoop commands in the background and would like to be able to kill them when I want to. What is the best way to do that at the command line?
if I do a fg at the terminal, will that bring only the snoop that I got running myself so I stop them with a CTRL_C or will that... (2 Replies)
Discussion started by: Pouchie1
2 Replies
8. HP-UX
Hi All,
I want to get %cpu and %memory utilization for a given process id in HP-UX so am using the following commands
1)TOP -p <PID> am getting error message like Quitting top: pset 26323 doesn't exist,but when am using only TOP command without any options its working fine.
2)ps -e -o pcpu... (5 Replies)
Discussion started by: Ramya_Nm
5 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
Is it possible to run second/multiple commands at a time in script before the completion/return of first command?
Pls reply. (5 Replies)
Discussion started by: cns1710
5 Replies
10. Shell Programming and Scripting
I have to create two instances of jBoss 5.1.0 GA. In order to do that I have to execute the following in start-jboss.sh:
find . -exec /opt/novell/idm/jboss/bin/run.sh -Djboss.service.binding.set=ports-01 -c IDMProv -b 0.0.0.0 \; -exec /opt/novell/idm/jboss/bin/run.sh... (4 Replies)
Discussion started by: Joydeep Ghosh
4 Replies
LEARN ABOUT OSX
opensnoop
opensnoop(1m) USER COMMANDS opensnoop(1m)
NAME
opensnoop - snoop file opens as they occur. Uses DTrace.
SYNOPSIS
opensnoop [-a|-A|-ceghsvxZ] [-f pathname] [-n name] [-p PID]
DESCRIPTION
opensnoop tracks file opens. As a process issues a file open, details such as UID, PID and pathname are printed out.
The returned file descriptor is printed, a value of -1 indicates an error. This can be useful for troubleshooting to determine if applia-
cions are attempting to open files that do not exist.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS
-a print all data
-A dump all data, space delimited
-c print current working directory of process
-e print errno value
-g print full command arguments
-s print start time, us
-v print start time, string
-x only print failed opens
-Z print zonename
-f pathname
file pathname to snoop
-n name
process name to snoop
-p PID process ID to snoop
EXAMPLES
Default output, print file opens by process as they occur,
# opensnoop
Print human readable timestamps,
# opensnoop -v
See error codes,
# opensnoop -e
Snoop this file only,
# opensnoop -f /etc/passwd
FIELDS
ZONE Zone name
UID User ID
PID Process ID
PPID Parent Process ID
FD File Descriptor (-1 is error)
ERR errno value (see /usr/include/sys/errno.h)
CWD current working directory of process
PATH pathname for file open
COMM command name for the process
ARGS argument listing for the process
TIME timestamp for the open event, us
STRTIME
timestamp for the open event, string
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
opensnoop will run forever until Ctrl-C is hit.
BUGS
occasionally the pathname for the file open cannot be read and the following error will be seen,
dtrace: error on enabled probe ID 6 (...): invalid address
this is normal behaviour.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO
dtrace(1M), truss(1)
version 1.60 Jan 12, 2006 opensnoop(1m)