-   Linux - Newbie (
-   -   Capture monitor output (

mjnman 03-14-2008 08:37 AM

Capture monitor output
I have a problem with my server. Is it possible capture a output of monitor in a file? I have a Debian Etch in a X86 server.

bigrigdriver 03-14-2008 08:42 AM

Unfortunately the monitor doesn't output anything; it just displays the signal received from the graphics card.

It would be better if you told us what kind of problem you are having with your server.

unSpawn 03-14-2008 08:42 AM

With Imagemagick: 'import -window root screen.png',
with Xwd: 'xwd -display localhost:0 -root > screen.dmp',
with Xv: 'xv -grabdelay 2 screen.jpg',
else see scrot, fbgrab or the gimp?

mjnman 03-15-2008 04:27 AM

I have only text on monitor output

pwalden 03-15-2008 06:12 PM

Well if all else fails, I grab my digital camera and take a picture of the console. You can then upload the jpeg.

niceguy_81333 03-16-2008 10:57 AM

Print Screen on keyboard works in Windows. I havent tried it in Linux.

Registered linux user #467324
ALL HUMAN ACTIONS ARE EQUIVALENT...............................

matthewg42 03-16-2008 11:57 AM

The question is - do you want to make an x-windows screen dump, or just capture the input and output of a terminal session?

For a screen dump of x-windows, both gnome and kde have scren capture programs. ksnapshot is the one usually installed with KDE. I don't remember the gnome one now, perhaps someone else can furnish you with the name.

Failing that you can use the command line tool xwd (x-window-dump). See the xwd manual page for more details.

For saving the text output of a terminal session you also have several options.
  1. Use script. This saves the input and output of a shell to a file, e.g.

    script mysession.log
    Then perform any actions you with to log, and finally press control-D to end the script session.
  2. Start a screen session, do what you want to do, and then press control-A h to write a "hardcopy" of the screen to a file.
  3. If you are using a Linux VT (i.e. not running X), use gpm to enable mouse copy-paste.
  4. If you are using an xterm or other, just copy paste to a file.

osor 03-16-2008 01:35 PM

In linux, if you want a screen dump of a virtual console (e.g., tty1), you can use the character vcs chardevs. Upon a read they output virtual console memory. No linebreaks are present, so you will either have to know the console’s column width or just use the same column width when reading.


cat /dev/vcs1 > screendump
Or if you want to force linebreaks for an 80-char terminal

fold -w 80 /dev/vcs1 > screendump
I can do this kind of thing from an ssh session to a server whose console I cannot physically see.

mjnman 03-17-2008 06:41 AM

thanks for your answer but with "cat /dev/tty1 > /var/tmp/console" capture only the text when press key not error/information output from host. If use a script or screen the login is open. I want capture monitor output of the console for error and information messages.

osor 03-17-2008 11:22 AM


Originally Posted by mjnman (Post 3091236)
thanks for your answer but with "cat /dev/tty1 > /var/tmp/console" capture only the text when press key not error/information output from host.

Yes, but did you read my post about the vcs? chardevs?

chrism01 03-18-2008 12:40 AM

most of that should be in /var/log, largely /var/log/messages (dmesg for boot up msgs)

All times are GMT -5. The time now is 09:27 PM.