LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-07-2015, 09:54 AM   #1
DouglasHayes
LQ Newbie
 
Registered: Dec 2014
Posts: 6

Rep: Reputation: Disabled
Linux commands not displaying


Having a weird issue, if I remote into the server and run a linux command that requires more than one page of displaying information then the command hangs or seems to appear to hang. For example if I run 'cat /var/log/messages' nothing comes back and seems to hang, if I run 'tail /var/log/messages' then it comes back fine with no hang. Anything less than page will display the information anything more than that will seem to hang and do nothing.

But when I say hang its not like the process hangs because when I open another session and look for the process it isn't there any longer.

If I run the commands directly from the console there are no issues at all. Has anyone ever ran into something like this in the past?

I appreciate your help,
Best Regards,

Doug
 
Old 01-07-2015, 10:19 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
May be it is waiting for network transfer. Also what are you using for remote session?
 
Old 01-07-2015, 12:02 PM   #3
DouglasHayes
LQ Newbie
 
Registered: Dec 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Using SSH currently with PUTTY, but its not a problem with PUTTY as I can connect to other servers and run commands with no issues, just seems to be to this one linux server. Like I stated if I run a command thats displays less than a single page of information it works fine. Example: df to display the filesystems is fine but if I use the top command nothing will show up, strange behavior for sure.

Last edited by DouglasHayes; 01-07-2015 at 12:06 PM.
 
Old 01-09-2015, 07:19 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,954
Blog Entries: 13

Rep: Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986
Dumb question, but is cat working properly? Are there other examples of commands where this is a problem? What if you use more or if you perform:
Code:
cat /var/log/messages | more
Perhaps this is a situation where cat is directing to stdout and since you're remotely attached, you are not stdout. I'm not too keen on the server:0.0 notations, used to use that all the time back in the days of the Vax and attaching to a mainframe from a terminal. But there are notation ways to determine your particular X display number/address and then use that either as part of a command or issue a general X setting to cause the redirection of things like stdin/stdout for situations where you are a remote terminal.

Another option is if you are using ssh is to use the -X or -Y flags.

EDIT: I see that you are using ssh, so try the -X or -Y flags when you ssh over and see if that changes things.

Last edited by rtmistler; 01-09-2015 at 07:20 AM.
 
Old 01-09-2015, 09:24 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Is /var/log/ a network (NFS?) mount?
in terminal >
Code:
df -hT
will show you.
Are /var/log/messages being rotated? It could become quite large if it's not.
How's your ISP connection speed? High bandwidth?

Last edited by Habitual; 01-09-2015 at 09:25 AM.
 
Old 01-19-2015, 08:24 PM   #6
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 689

Rep: Reputation: 159Reputation: 159
I came across some project notes in a google search from a few years back. There was this long discussion between project members about the differing modes of terminal communication and how some of them were failing with their program. They changed some of the character translations somewhere to adapt to what the terminal driver was doing. Much of their problem pertained to the return key and the KP return and the differing translations encountered.
They specifically mentioned special problems when exceeding a single page of display.

This might be relevant. Using a different terminal communication invokes different character translations. One of them may be badly interacting with your local program, which causes it to respond in a way that the other program interprets as EXIT.

Consider what happens when the less command fills the page and displays the bottom line as a command line. It may use ESC sequences, or other terminal codes. Your network may not be entirely transparent to them. With cat and tail, it is harder to see what they would do.

You will have to get some capture program in between the target and your remote that captures the communication of both without affecting them.

Make some test files of half page, one page, and two page lengths. Use these for tests to isolate the communication problem from any /var/log/ considerations.
>> tail /var/log/messages > test_half
>> cat test_half test_half > test_one
>> cat test_one test_one > test_two
The remotely try cat, more, less, and other ways to display the files. This should narrow the possibilities.
 
  


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
odbc (php output not displaying in web browser,but it displaying in terminal) manu@vssc Red Hat 1 06-29-2011 01:33 AM
Conky: problems displaying output from certain scripts or commands zymos Linux - Software 1 09-10-2009 05:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:42 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration