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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-07-2015, 09:54 AM
|
#1
|
LQ Newbie
Registered: Dec 2014
Posts: 6
Rep: 
|
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
|
|
|
01-07-2015, 10:19 AM
|
#2
|
Senior Member
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524
|
May be it is waiting for network transfer. Also what are you using for remote session?
|
|
|
01-07-2015, 12:02 PM
|
#3
|
LQ Newbie
Registered: Dec 2014
Posts: 6
Original Poster
Rep: 
|
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.
|
|
|
01-09-2015, 07:19 AM
|
#4
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,954
|
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.
|
|
|
01-09-2015, 09:24 AM
|
#5
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep: 
|
Is /var/log/ a network (NFS?) mount?
in terminal >
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.
|
|
|
01-19-2015, 08:24 PM
|
#6
|
Member
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 689
Rep: 
|
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.
|
|
|
All times are GMT -5. The time now is 05:42 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|