- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Toggling xterm logging
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО11-10-2003 05:14 AM
тАО11-10-2003 05:14 AM
Toggling xterm logging
I have an application that is running in, and writes to the stdout of an xterm window. I need to create a log of the output from the application.
I am aware that after the application has started, one can enable or disable logging via a mouse click by selecting or deselecting the "log to file" option in the pop down menu.
However, this requires one to have access to the xterm window itself. If I am diailing in via a modem into the machine where my application is already running in an xterm window, is there anay way that I can send a message from the command line that essentially does the same thing as toggling the "log to file" menu item?
I am running HP-UX B.10.20 on a 9000/820 series machine.
Thanks
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2003 09:30 PM
тАО11-10-2003 09:30 PM
Re: Toggling xterm logging
I ask because I don't think xterm has logging capability (not on my machine and not in the man page), whereas hpterm and dtterm do.
If hpterm or dtterm, why not just start up logging at invocation time (using "-l -lf logfile") and leave it on ?
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2003 10:27 PM
тАО11-10-2003 10:27 PM
Re: Toggling xterm logging
But it depends on what you want. A way that works is using xwd... You can dump the contents of the hpterm at the time you want the contents. But to get info over a period of time, this will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2003 10:30 PM
тАО11-10-2003 10:30 PM
Re: Toggling xterm logging
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2003 01:09 AM
тАО11-11-2003 01:09 AM
Re: Toggling xterm logging
A better solution would be to modify the command that is running in the xterm window to use the tee command and log all of the application output to a file that you can examine remotely.
You might have to dig around through the apps startup scripts to achieve this. Another optio n might be to modify the application script to use typescript.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2003 03:24 AM
тАО11-11-2003 03:24 AM
Re: Toggling xterm logging
I used the -lf option to xterm to specify a logfile, except that instead of specifying an actual file name, I specified the endpoint of a pipeline. This can be a shell script to which the output from the xterm window would be piped as input. I wrote the script in the korn shell to utlize the ability to handle signals sent to the script. I used the SIGUSR1 signal to specify to the shell script that its input needs to be logged, and the SIGUSR2 signal to specify that its input no longer needs to be logged.
To send the signals, I used the "kill" command. For example, "kill -SIGUSR1 pid", where pid is the process id of my korn shell script. This seems to work.
Thanks
Raj