0

I have some Vxworks embedded os and I want to check the netstat.

This is what I tried:

-> inetstatShow

And the output is:

C interp: unknown symbol name 'inetstatShow'.

How can I have netstat command in this?

MLSC
  • 5,872
  • 8
  • 55
  • 89

2 Answers2

2

inetstatShow is provided by netShow library - you need to be sure that your OS configuration includes netShow, or you can dynamically load it using ld.

The lkup function can be used to list symbols that are available to the shell. Try lkup "Show" to list all symbols that include the sub-string "Show" for example.

Clifford
  • 88,407
  • 13
  • 85
  • 165
  • Thank you... Can I load the module from remote host? how? – MLSC Jun 08 '14 at 05:06
  • 1
    @MortezaLSC : It is a long time since I have used VxWorks. `ld` is odd in that it takes input from stdin, so you must use redirection to use a file. If you can access the remote object file from your VxWorks target, then you can load it. http://www.vxdev.com/docs/vx55man/vxworks/ref/usrLib.html#ld – Clifford Jun 08 '14 at 08:26
  • So you mean I should compile `netstat` in my vxworks? I only have remote access to my vxworks machine and my os on my pc is linux. Firstly I should login to vxworks then load compiled netstat code? :( – MLSC Jun 08 '14 at 10:21
  • 1
    If you want netShow permanently in your OS, then you should configure VxWorks accordingly. If it is just a development requirement, load it from your development host as necessary. – Clifford Jun 08 '14 at 11:23
  • +1 ... Thank you I am closing to the answer. is it possible for me to compile c program on my ubuntu then load `compiled.o` file to the remote vxworks? how? – MLSC Jun 10 '14 at 07:44
1

VxWorks supports netstat command.

-> netstat "-n -a" /* state of sockets */
-> netstat "-n -r" /* routing table */
JaeMann Yeh
  • 358
  • 2
  • 9
  • As @Clifford said, this works only if the netShow lib is included in the vxworks kernel and if INCLUDE_NETSTAT is also enabled in the kernel config. – Okkenator Jan 08 '21 at 19:17