- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- looking for a "watch" command for hpux...
Operating System - HP-UX
1752777
Members
6118
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2009 10:25 AM
тАО12-22-2009 10:25 AM
looking for a "watch" command for hpux...
I was wondering if anyone knew of where I could find the watch command for hpux.
checked the usual sources, and no luck.
Currently I have the following shell equivalent for the watch command:
$ cat watch
#!/bin/sh
while [ 1 ] ; do
clear
echo "Command: $*"
date
echo ""
( $* )
sleep 2
done
$
does anyone know of a gnu-watch (or equivalent) for hpux?
thanks and hh,
manny
checked the usual sources, and no luck.
Currently I have the following shell equivalent for the watch command:
$ cat watch
#!/bin/sh
while [ 1 ] ; do
clear
echo "Command: $*"
date
echo ""
( $* )
sleep 2
done
$
does anyone know of a gnu-watch (or equivalent) for hpux?
thanks and hh,
manny
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2009 12:01 PM
тАО12-22-2009 12:01 PM
Re: looking for a "watch" command for hpux...
Someone showed me watch on Linux last year and I just had to have it myself, so I tried to compile it on 11.31 and threw the towel... didn't want to spend an afternoon tweaking it. I wrote a shell script which is strikingly similar to yours and it does the job.
Olivier
Olivier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2009 12:46 AM
тАО12-23-2009 12:46 AM
Re: looking for a "watch" command for hpux...
A simple approach would be to append a copy of everything printed to the user's screen to a file; Execute "script" command at user's terminal after he logs in (add it to his profile) :
"script -a /tmp/watch.user"
At your terminal execute "tail -f /tmp/watch.user"; you will get a real-time view of what user's cmds & outputs.
Other than that you can move to VNC or HP's SharedX ...or others.
T#
"script -a /tmp/watch.user"
At your terminal execute "tail -f /tmp/watch.user"; you will get a real-time view of what user's cmds & outputs.
Other than that you can move to VNC or HP's SharedX ...or others.
T#
Little learning is dangerous!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2009 07:24 AM
тАО12-23-2009 07:24 AM
Re: looking for a "watch" command for hpux...
yeah, I always do these things with "while true; do...sleep". However, do not have an alias for that.
@Louah: no, this 'watch' isn't used for watching users activity. This is for running a command every x seconds and watch it's output. A linux-friend of mine has showed me it, and he wondered that we don't have such a 'tool' on HP-UX.
btw: from 'man watch':
"watch - execute a program periodically, showing output fullscreen"
@Louah: no, this 'watch' isn't used for watching users activity. This is for running a command every x seconds and watch it's output. A linux-friend of mine has showed me it, and he wondered that we don't have such a 'tool' on HP-UX.
btw: from 'man watch':
"watch - execute a program periodically, showing output fullscreen"
****
Unix operates with beer.
Unix operates with beer.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP