For example when I write telnet abc.wtf the telnet session begins saying trying to connect so and so IP, but is there a command that I can type in and know what is the current process happening to achieve the task. may be any info whats so ever, I already know ps ps aux|grep telnet > for the above example top htop all these just provide information about the thread/process but not the background or details about the process happening and how much it has achieved

  • Can you edit your question to clarify which specific details you are looking for but aren't provided by ps? – Anthony Geoghegan Sep 7 '15 at 18:29

There are a few ways you can find out more on what a program like telnet is doing. In order of difficulty:

Firstly, you can use a program called Wireshark to analyse the actual packets telnet is sending and recieving.

Secondly, you can run the program through GDB (GNU Debugger) to watch what the program does step-by step. This is likely to slow down your program badly.

Thirdly, you can read the actual source code of the program to figure out what the program would do if passed a specific argument.

I'm being intentionally vague on how you would use either of the programs to achieve the specified goal, because their manuals can describe it better than I can.

Wireshark manual: https://www.wireshark.org/docs/wsug_html_chunked/

GDB manual: http://sourceware.org/gdb/current/onlinedocs/gdb/

As for the third option, don't try unless you know the programming language your telnet implementation is written in already.

| improve this answer | |
  • Telnet is just an example, I have used GDB and wireshark but, when it comes to packet sniffing yes and yes this solves telnet issue. but what if there was a internal process that was taking time and i needed to know how much it had completed and what all it had done so far, – hubatrix Sep 7 '15 at 18:46
  • I'm not sure if there is a way to do that... if you REALLY want a program to output progress indicators, you could edit the program code. Besides that method, I'm not sure. If you want to find out what files the program currently has open (to find out what it's doing) you could do lsof -p [pid], where [pid] is the process ID of the program. – re-cursion Sep 7 '15 at 18:59

Unless the command itself provides feedback, such as with a -v or --verbose switch or some kind of logging (telnet does not), the answer is no.

Or not really. You can use strace telnet abc.wtf but I don't think that's what you were looking for.

| improve this answer | |
  • yes , strace is not what i am looking for, but i thought there would be a utility to see the amount of process happening not in a network medium but in local OS, just like strace for telnet. – hubatrix Sep 7 '15 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.