LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-14-2008, 08:37 AM   #1
mjnman
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Rep: Reputation: 0
Capture monitor output


Hi,
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.
thanks
Matteo
 
Old 03-14-2008, 08:42 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,770

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
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.
 
Old 03-14-2008, 08:42 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,285
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
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?
 
Old 03-15-2008, 04:27 AM   #4
mjnman
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Original Poster
Rep: Reputation: 0
I have only text on monitor output
 
Old 03-15-2008, 06:12 PM   #5
pwalden
Member
 
Registered: Jun 2003
Location: Washington
Distribution: Fedora FC19, Raspbian
Posts: 287

Rep: Reputation: 38
Well if all else fails, I grab my digital camera and take a picture of the console. You can then upload the jpeg.
 
Old 03-16-2008, 10:57 AM   #6
niceguy_81333
Member
 
Registered: Mar 2008
Location: India
Distribution: RHEL5
Posts: 34

Rep: Reputation: 15
Print Screen on keyboard works in Windows. I havent tried it in Linux.
rgds
bil

Registered linux user #467324
_________________________________________________________________
ALL HUMAN ACTIONS ARE EQUIVALENT...............................
AND ALL ARE ON PRINCIPLE DOOMED 2 FAILURE
_________________________________________________________________
 
Old 03-16-2008, 11:57 AM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
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.
    Code:
    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.
 
1 members found this post helpful.
Old 03-16-2008, 01:35 PM   #8
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
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.

E.g.,
Code:
cat /dev/vcs1 > screendump
Or if you want to force linebreaks for an 80-char terminal
Code:
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.
 
Old 03-17-2008, 06:41 AM   #9
mjnman
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Original Poster
Rep: Reputation: 0
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.
Matteo
 
Old 03-17-2008, 11:22 AM   #10
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by mjnman View Post
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?
 
Old 03-18-2008, 12:40 AM   #11
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to capture the output of a interactive script? Akhran Linux - Newbie 4 04-11-2007 09:28 PM
Capture output from another computer mijohnst Linux - General 2 09-21-2006 03:58 PM
capture the output to a variable Melsync Linux - General 4 09-07-2006 02:17 PM
Capture 'make' Output to File Kenji Miyamoto Linux - Software 4 05-23-2005 05:56 PM
capture make's output gboutwel Linux - Newbie 2 07-07-2002 05:15 AM


All times are GMT -5. The time now is 11:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration