netstat

I’ve just installed QNXRTP and managed to connect to my ISP via PPP, but when
I attempt to use netstat to check the status of of the network, I get:

netstat: no namelist

Can anyone tell me what this means?

Will Parsons | wbparsons@Ysnet.net
(To reply: remove Y from e-mail address)

Will Parsons <wbp@ysnet.net> wrote:

: I’ve just installed QNXRTP and managed to connect to my ISP via PPP, but when
: I attempt to use netstat to check the status of of the network, I get:

: netstat: no namelist

: Can anyone tell me what this means?

Are you running with the tiny stack or the big stack? (tiny is the
default). Netstat will only work with the big stack. To get information
on the tiny stack try nicinfo and cat /proc/ipstats

: –
: =========================================
: Will Parsons | wbparsons@Ysnet.net
: (To reply: remove Y from e-mail address)
: =========================================


Peter Martin

Peter Martin <peterm@qnx.com> wrote:

Will Parsons <> wbp@ysnet.net> > wrote:

: I’ve just installed QNXRTP and managed to connect to my ISP via PPP, but when
: I attempt to use netstat to check the status of of the network, I get:

: netstat: no namelist

: Can anyone tell me what this means?

Are you running with the tiny stack or the big stack? (tiny is the
default). Netstat will only work with the big stack. To get information
on the tiny stack try nicinfo and cat /proc/ipstats

Well, I guess if tiny is the default I’m running tiny. How do I run the big
stack?

I tried nicinfo & cat /proc/ipstats with the following results:

(after dialing & connecting to ISP)

3 localhost% ls -l /dev/io-net/
total 0
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip0
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip_ppp
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ppp0

4 localhost% cat /proc/ipstats
Ttcpip Sep 5 2000 08:56:16

verbosity level 0
ip checksum errors: 0
udp checksum errors: 0
tcp checksum errors: 0

packets sent: 958
packets received: 958

ppp0 : addr 204.60.8.17 netmask 255.255.255.0 up
lo0 : addr 127.0.0.1 netmask 255.0.0.0 up

DST: 204.60.8.2 NETMASK: 255.255.255.255 GATEWAY: ppp0
DST: 127.0.0.0 NETMASK: 255.0.0.0 GATEWAY: lo0
DST: 0.0.0.0 NETMASK: 0.0.0.0 GATEWAY: 204.60.8.2

TCP 127.0.0.1.5096 > 127.0.0.1.6000 ESTABLISHED snd 0 rcv 0
TCP 127.0.0.1.5097 > 127.0.0.1.6000 ESTABLISHED snd 120 rcv 0
TCP 127.0.0.1.6000 > 127.0.0.1.5097 ESTABLISHED snd 0 rcv 0
TCP 127.0.0.1.6000 > 127.0.0.1.5096 ESTABLISHED snd 0 rcv 0
TCP 0.0.0.0.6000 LISTEN

5 localhost% nicinfo
nicinfo: Could not open: /dev/io-net/en0, (No such file or directory)

6 localhost% su
password:

nicinfo

nicinfo
nicinfo: Could not open: /dev/io-net/en0, (No such file or directory)

nicinfo -r ip-ppp
nicinfo: Could not open: /dev/io-net/ip-ppp, (No such file or directory)

nicinfo -r ppp0

nicinfo ppp0
nicinfo: Could not open: ppp0, (No such file or directory)

ls -l /dev/io-net/

ls -l /dev/io-net/
total 0
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip0
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip_ppp
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ppp0

================================================================

Then, after disconnecting and attempting to reconnect, I got the following
message from the Dialer!

pppd: Sorry - this system lacks PPP kernel support.

Will Parsons | wbparsons@Ysnet.net
(To reply: remove Y from e-mail address)

Hi Will

Check out:

http://qdn.qnx.com/support/bok/solution.qnx?10080

This tells you how to startup the big stack.

Erick.


Will Parsons <wbp@ysnet.net> wrote:

Peter Martin <> peterm@qnx.com> > wrote:
Will Parsons <> wbp@ysnet.net> > wrote:

: I’ve just installed QNXRTP and managed to connect to my ISP via PPP, but when
: I attempt to use netstat to check the status of of the network, I get:

: netstat: no namelist

: Can anyone tell me what this means?

Are you running with the tiny stack or the big stack? (tiny is the
default). Netstat will only work with the big stack. To get information
on the tiny stack try nicinfo and cat /proc/ipstats

Well, I guess if tiny is the default I’m running tiny. How do I run the big
stack?

I tried nicinfo & cat /proc/ipstats with the following results:

(after dialing & connecting to ISP)

3 localhost% ls -l /dev/io-net/
total 0
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip0
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip_ppp
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ppp0

4 localhost% cat /proc/ipstats
Ttcpip Sep 5 2000 08:56:16

verbosity level 0
ip checksum errors: 0
udp checksum errors: 0
tcp checksum errors: 0

packets sent: 958
packets received: 958

ppp0 : addr 204.60.8.17 netmask 255.255.255.0 up
lo0 : addr 127.0.0.1 netmask 255.0.0.0 up

DST: 204.60.8.2 NETMASK: 255.255.255.255 GATEWAY: ppp0
DST: 127.0.0.0 NETMASK: 255.0.0.0 GATEWAY: lo0
DST: 0.0.0.0 NETMASK: 0.0.0.0 GATEWAY: 204.60.8.2

TCP 127.0.0.1.5096 > 127.0.0.1.6000 ESTABLISHED snd 0 rcv 0
TCP 127.0.0.1.5097 > 127.0.0.1.6000 ESTABLISHED snd 120 rcv 0
TCP 127.0.0.1.6000 > 127.0.0.1.5097 ESTABLISHED snd 0 rcv 0
TCP 127.0.0.1.6000 > 127.0.0.1.5096 ESTABLISHED snd 0 rcv 0
TCP 0.0.0.0.6000 LISTEN

5 localhost% nicinfo
nicinfo: Could not open: /dev/io-net/en0, (No such file or directory)

6 localhost% su
password:

nicinfo

nicinfo
nicinfo: Could not open: /dev/io-net/en0, (No such file or directory)

nicinfo -r ip-ppp
nicinfo: Could not open: /dev/io-net/ip-ppp, (No such file or directory)

nicinfo -r ppp0

nicinfo ppp0
nicinfo: Could not open: ppp0, (No such file or directory)

ls -l /dev/io-net/

ls -l /dev/io-net/
total 0
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip0
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip_ppp
crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ppp0

================================================================

Then, after disconnecting and attempting to reconnect, I got the following
message from the Dialer!

pppd: Sorry - this system lacks PPP kernel support.

Will Parsons | > wbparsons@Ysnet.net
(To reply: remove Y from e-mail address)

Will Parsons <wbp@ysnet.net> wrote:
: Peter Martin <peterm@qnx.com> wrote:
:>Will Parsons <wbp@ysnet.net> wrote:
:>
:>: I’ve just installed QNXRTP and managed to connect to my ISP via PPP, but when
:>: I attempt to use netstat to check the status of of the network, I get:
:>
:>: netstat: no namelist
:>
:>: Can anyone tell me what this means?
:>
:>Are you running with the tiny stack or the big stack? (tiny is the
:>default). Netstat will only work with the big stack. To get information
:>on the tiny stack try nicinfo and cat /proc/ipstats

: Well, I guess if tiny is the default I’m running tiny. How do I run the big
: stack?

In the file /etc/system/enum/include/net, change the line:
set(IONET_CMD, io-net -pttcpip -ppppmgr)
to:
set(IONET_CMD, io-net -ptcpip -ppppmgr)

Make sure there are no control characters or backup files
around (use an editor like vi).

: I tried nicinfo & cat /proc/ipstats with the following results:
: ================================================================
: (after dialing & connecting to ISP)

: 3 localhost% ls -l /dev/io-net/
: total 0
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip0
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip_ppp
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ppp0

: 4 localhost% cat /proc/ipstats
: Ttcpip Sep 5 2000 08:56:16

: verbosity level 0
: ip checksum errors: 0
: udp checksum errors: 0
: tcp checksum errors: 0

: packets sent: 958
: packets received: 958

: ppp0 : addr 204.60.8.17 netmask 255.255.255.0 up
: lo0 : addr 127.0.0.1 netmask 255.0.0.0 up

: DST: 204.60.8.2 NETMASK: 255.255.255.255 GATEWAY: ppp0
: DST: 127.0.0.0 NETMASK: 255.0.0.0 GATEWAY: lo0
: DST: 0.0.0.0 NETMASK: 0.0.0.0 GATEWAY: 204.60.8.2

: TCP 127.0.0.1.5096 > 127.0.0.1.6000 ESTABLISHED snd 0 rcv 0
: TCP 127.0.0.1.5097 > 127.0.0.1.6000 ESTABLISHED snd 120 rcv 0
: TCP 127.0.0.1.6000 > 127.0.0.1.5097 ESTABLISHED snd 0 rcv 0
: TCP 127.0.0.1.6000 > 127.0.0.1.5096 ESTABLISHED snd 0 rcv 0
: TCP 0.0.0.0.6000 LISTEN

: 5 localhost% nicinfo
: nicinfo: Could not open: /dev/io-net/en0, (No such file or directory)

: 6 localhost% su
: password:

: # nicinfo
: nicinfo
: nicinfo: Could not open: /dev/io-net/en0, (No such file or directory)
: #

This looks fine up to here.

: nicinfo -r ip-ppp
: nicinfo: Could not open: /dev/io-net/ip-ppp, (No such file or directory)

The above probably crashed io-net. This has been fixed for a
while and should be in patch A.

: # nicinfo -r ppp0
: nicinfo ppp0
: nicinfo: Could not open: ppp0, (No such file or directory)

io-net is probably gone.

: # ls -l /dev/io-net/
: ls -l /dev/io-net/
: total 0
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip0
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip_ppp
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ppp0

: ================================================================

I’m assuming the above is a cut and paste? Was io-net really running
at this point?

: Then, after disconnecting and attempting to reconnect, I got the following
: message from the Dialer!

: pppd: Sorry - this system lacks PPP kernel support.

io-net is probably gone.

-seanb

Sean Boudreau <seanb@qnx.com> wrote:

Will Parsons <> wbp@ysnet.net> > wrote:
: Peter Martin <> peterm@qnx.com> > wrote:
:>Will Parsons <> wbp@ysnet.net> > wrote:
:
:>: I’ve just installed QNXRTP and managed to connect to my ISP via PPP, but when
:>: I attempt to use netstat to check the status of of the network, I get:
:
:>: netstat: no namelist
:
:>: Can anyone tell me what this means?
:
:>Are you running with the tiny stack or the big stack? (tiny is the
:>default). Netstat will only work with the big stack. To get information
:>on the tiny stack try nicinfo and cat /proc/ipstats

: Well, I guess if tiny is the default I’m running tiny. How do I run the big
: stack?

In the file /etc/system/enum/include/net, change the line:
set(IONET_CMD, io-net -pttcpip -ppppmgr)
to:
set(IONET_CMD, io-net -ptcpip -ppppmgr)

Make sure there are no control characters or backup files
around (use an editor like vi).

: I tried nicinfo & cat /proc/ipstats with the following results:
: ================================================================
: (after dialing & connecting to ISP)

: 3 localhost% ls -l /dev/io-net/
: total 0
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip0
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip_ppp
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ppp0

: 4 localhost% cat /proc/ipstats
: Ttcpip Sep 5 2000 08:56:16

: verbosity level 0
: ip checksum errors: 0
: udp checksum errors: 0
: tcp checksum errors: 0

: packets sent: 958
: packets received: 958

: ppp0 : addr 204.60.8.17 netmask 255.255.255.0 up
: lo0 : addr 127.0.0.1 netmask 255.0.0.0 up

: DST: 204.60.8.2 NETMASK: 255.255.255.255 GATEWAY: ppp0
: DST: 127.0.0.0 NETMASK: 255.0.0.0 GATEWAY: lo0
: DST: 0.0.0.0 NETMASK: 0.0.0.0 GATEWAY: 204.60.8.2

: TCP 127.0.0.1.5096 > 127.0.0.1.6000 ESTABLISHED snd 0 rcv 0
: TCP 127.0.0.1.5097 > 127.0.0.1.6000 ESTABLISHED snd 120 rcv 0
: TCP 127.0.0.1.6000 > 127.0.0.1.5097 ESTABLISHED snd 0 rcv 0
: TCP 127.0.0.1.6000 > 127.0.0.1.5096 ESTABLISHED snd 0 rcv 0
: TCP 0.0.0.0.6000 LISTEN

: 5 localhost% nicinfo
: nicinfo: Could not open: /dev/io-net/en0, (No such file or directory)

: 6 localhost% su
: password:

: # nicinfo
: nicinfo
: nicinfo: Could not open: /dev/io-net/en0, (No such file or directory)
: #

This looks fine up to here.

: nicinfo -r ip-ppp
: nicinfo: Could not open: /dev/io-net/ip-ppp, (No such file or directory)

The above probably crashed io-net. This has been fixed for a
while and should be in patch A.

: # nicinfo -r ppp0
: nicinfo ppp0
: nicinfo: Could not open: ppp0, (No such file or directory)

io-net is probably gone.

: # ls -l /dev/io-net/
: ls -l /dev/io-net/
: total 0
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip0
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ip_ppp
: crw-rw-rw- 1 root root 0, 1 Dec 18 21:23 ppp0

: ================================================================

I’m assuming the above is a cut and paste? Was io-net really running
at this point?

: Then, after disconnecting and attempting to reconnect, I got the following
: message from the Dialer!

: pppd: Sorry - this system lacks PPP kernel support.

io-net is probably gone.

-seanb

Thanks for your replies. I’ve changed /etc/system/enum/include/net
as suggested and then rebooted but I still am having problems running
netstat:

================================================

(after dialing and connecting to ISP)

1 localhost% netstat
netstat: no namelist

2 localhost% cat /proc/ipstats
Ttcpip Sep 5 2000 08:56:16

verbosity level 0
ip checksum errors: 0
udp checksum errors: 0
tcp checksum errors: 0

packets sent: 2057
packets received: 2057

ppp0 : addr 204.60.8.177 netmask 255.255.255.0 up
lo0 : addr 127.0.0.1 netmask 255.0.0.0 up

DST: 204.60.8.130 NETMASK: 255.255.255.255 GATEWAY: ppp0
DST: 127.0.0.0 NETMASK: 255.0.0.0 GATEWAY: lo0
DST: 0.0.0.0 NETMASK: 0.0.0.0 GATEWAY: 204.60.8.130

TCP 127.0.0.1.2493 > 127.0.0.1.6000 ESTABLISHED snd 0 rcv 0
TCP 127.0.0.1.2494 > 127.0.0.1.6000 ESTABLISHED snd 120 rcv 0
TCP 127.0.0.1.6000 > 127.0.0.1.2494 ESTABLISHED snd 0 rcv 0
TCP 127.0.0.1.6000 > 127.0.0.1.2493 ESTABLISHED snd 0 rcv 0
TCP 0.0.0.0.6000 LISTEN

3 localhost% cat /etc/system/enum/include/net

macro definitions for network

all
set(IONET_CMD, io-net -ptcpip -ppppmgr)

================================================

I assume that since the output of “cat /proc/ipstats” mentions “Ttcpip”
I am still running the tiny stack? But why? (I did reboot after changing
…/net to use the big stack.)

Will Parsons | wbparsons@Ysnet.net
(To reply: remove Y from e-mail address)

Will Parsons <wbp@ysnet.net> wrote:
: Thanks for your replies. I’ve changed /etc/system/enum/include/net
: as suggested and then rebooted but I still am having problems running
: netstat:

: ================================================

: (after dialing and connecting to ISP)

: 1 localhost% netstat
: netstat: no namelist

: 2 localhost% cat /proc/ipstats
: Ttcpip Sep 5 2000 08:56:16

: verbosity level 0
: ip checksum errors: 0
: udp checksum errors: 0
: tcp checksum errors: 0

: packets sent: 2057
: packets received: 2057

: ppp0 : addr 204.60.8.177 netmask 255.255.255.0 up
: lo0 : addr 127.0.0.1 netmask 255.0.0.0 up

: DST: 204.60.8.130 NETMASK: 255.255.255.255 GATEWAY: ppp0
: DST: 127.0.0.0 NETMASK: 255.0.0.0 GATEWAY: lo0
: DST: 0.0.0.0 NETMASK: 0.0.0.0 GATEWAY: 204.60.8.130

: TCP 127.0.0.1.2493 > 127.0.0.1.6000 ESTABLISHED snd 0 rcv 0
: TCP 127.0.0.1.2494 > 127.0.0.1.6000 ESTABLISHED snd 120 rcv 0
: TCP 127.0.0.1.6000 > 127.0.0.1.2494 ESTABLISHED snd 0 rcv 0
: TCP 127.0.0.1.6000 > 127.0.0.1.2493 ESTABLISHED snd 0 rcv 0
: TCP 0.0.0.0.6000 LISTEN

: 3 localhost% cat /etc/system/enum/include/net
: #
: # macro definitions for network
: #
:
: all
: set(IONET_CMD, io-net -ptcpip -ppppmgr)

: ================================================

: I assume that since the output of “cat /proc/ipstats” mentions “Ttcpip”
: I am still running the tiny stack? But why? (I did reboot after changing
: …/net to use the big stack.)


You’re still running the tiny stack. Make sure you don’t have any
backup net* files in /etc/system/enum/include. ie:

ls /etc/system/enum/include/net*

/etc/system/enum/include/net

no other net* files.

-seanb

Sean Boudreau <seanb@qnx.com> wrote:

Will Parsons <> wbp@ysnet.net> > wrote:
: Thanks for your replies. I’ve changed /etc/system/enum/include/net
: as suggested and then rebooted but I still am having problems running
: netstat:

: ================================================

: (after dialing and connecting to ISP)

: 1 localhost% netstat
: netstat: no namelist

: 2 localhost% cat /proc/ipstats
: Ttcpip Sep 5 2000 08:56:16

: verbosity level 0
: ip checksum errors: 0
: udp checksum errors: 0
: tcp checksum errors: 0

: packets sent: 2057
: packets received: 2057

: ppp0 : addr 204.60.8.177 netmask 255.255.255.0 up
: lo0 : addr 127.0.0.1 netmask 255.0.0.0 up

: DST: 204.60.8.130 NETMASK: 255.255.255.255 GATEWAY: ppp0
: DST: 127.0.0.0 NETMASK: 255.0.0.0 GATEWAY: lo0
: DST: 0.0.0.0 NETMASK: 0.0.0.0 GATEWAY: 204.60.8.130

: TCP 127.0.0.1.2493 > 127.0.0.1.6000 ESTABLISHED snd 0 rcv 0
: TCP 127.0.0.1.2494 > 127.0.0.1.6000 ESTABLISHED snd 120 rcv 0
: TCP 127.0.0.1.6000 > 127.0.0.1.2494 ESTABLISHED snd 0 rcv 0
: TCP 127.0.0.1.6000 > 127.0.0.1.2493 ESTABLISHED snd 0 rcv 0
: TCP 0.0.0.0.6000 LISTEN

: 3 localhost% cat /etc/system/enum/include/net
: #
: # macro definitions for network
: #
:
: all
: set(IONET_CMD, io-net -ptcpip -ppppmgr)

: ================================================

: I assume that since the output of “cat /proc/ipstats” mentions “Ttcpip”
: I am still running the tiny stack? But why? (I did reboot after changing
: …/net to use the big stack.)


You’re still running the tiny stack. Make sure you don’t have any
backup net* files in /etc/system/enum/include. ie:

ls /etc/system/enum/include/net*

/etc/system/enum/include/net

no other net* files.

-seanb

In your earlier response to my posting you mentioned not having backup files,
but I forgot this when I changed the “net” file (my apologies). Yes, there
was a backup of “net” in the same directory. Unfortunately, deleting the
backup reveals another problem:

========================================================================

(after connecting to ISP)

1 localhost% netstat
netstat: no namelist

2 localhost% cat /proc/ipstat
/proc/ipstat: No such file or directory

3 localhost% ls /proc
1/ 217110/ 4101/ 475153/ 65546/ 81939/
110601/ 249881/ 4102/ 475156/ 65547/ 8199/
114703/ 266266/ 438300/ 475167/ 65549/ asound/
12296/ 356375/ 438301/ 491553/ 81932/ boot/
172053/ 401435/ 438302/ 495650/ 81934/ dumper#
2/ 4099/ 442400/ 544803/ 81936/ mount/
208920/ 4100/ 442404/ 573477/ 81938/ self/

4 localhost% ls -la /etc/system/enum/include
total 28
drwxrwxr-x 2 root root 2048 Sep 19 13:31 ./
drwxrwxr-x 4 root root 2048 Sep 11 16:32 …/
-rw-r–r-- 1 root root 149 May 08 2000 block
-rw-rw-r-- 1 root root 1866 May 08 2000 isa-types
-rw-rw-r-- 1 root root 84 Dec 19 18:18 net
-rw-rw-r-- 1 root root 423 Apr 18 2000 par-class
-rw-rw-r-- 1 root 120 287 Sep 19 18:20 pccard-types
-rw-rw-r-- 1 root root 72 Sep 12 14:34 pccard-vendors
-rw-rw-r-- 1 root root 1698 Apr 18 2000 pci-class
-rw-rw-r-- 1 root root 944 Apr 29 2000 pci-vendors
-rw-rw-r-- 1 root root 2324 Apr 18 2000 pnpbios-types

5 localhost% ls -l /dev/io-net
total 0
crw-rw-rw- 1 root root 0, 1 Dec 20 22:22 ip0
crw-rw-rw- 1 root root 0, 1 Dec 20 22:22 ip_ppp
crw-rw-rw- 1 root root 0, 1 Dec 20 22:22 ppp0

6 localhost% sin | grep io-net
io-net 65549 36K 348K 176K 956K 3245

========================================================================

Where do I look now? Any help would be much appreciated.

Will Parsons | wbparsons@Ysnet.net
(To reply: remove Y from e-mail address)

Will Parsons <wbp@ysnet.net> wrote:

: In your earlier response to my posting you mentioned not having backup files,
: but I forgot this when I changed the “net” file (my apologies). Yes, there
: was a backup of “net” in the same directory. Unfortunately, deleting the
: backup reveals another problem:

: ========================================================================

: (after connecting to ISP)

: 1 localhost% netstat
: netstat: no namelist

Try running netstat as root. It was shipped with the
setuid bit not set (oversight).

-seanb

Sean Boudreau <seanb@qnx.com> wrote:

Will Parsons <> wbp@ysnet.net> > wrote:

: In your earlier response to my posting you mentioned not having backup files,
: but I forgot this when I changed the “net” file (my apologies). Yes, there
: was a backup of “net” in the same directory. Unfortunately, deleting the
: backup reveals another problem:

: ========================================================================

: (after connecting to ISP)

: 1 localhost% netstat
: netstat: no namelist

Try running netstat as root. It was shipped with the
setuid bit not set (oversight).

-seanb

Thank you for your help. That was the answer. I’m happy enough running
netstat as root, but I do have a further question…

After verifying that netstat was not setuid, I attempted to fix the problem
myself with the following results:

cd /usr/bin

ls -l netstat

-rwxrwxr-x 1 root root 50800 Aug 23 04:00 netstat*

chmod u+s netstat

netstat: Invalid argument

chmod 4775 netstat

netstat: Invalid argument

ls -l netstat

-rwxrwxr-x 1 root root 50800 Aug 23 04:00 netstat*

touch x

ls -l x

-rw-rw-r-- 1 root root 0 Dec 21 17:34 x

chmod 4775 x

ls -l x

-rwsrwxr-x 1 root root 0 Dec 21 17:34 x*

So why can’t I set the setuid bit on netstat?

Will Parsons | wbparsons@Ysnet.net
(To reply: remove Y from e-mail address)

Will Parsons <wbp@ysnet.net> wrote:

Thank you for your help. That was the answer. I’m happy enough running
netstat as root, but I do have a further question…

After verifying that netstat was not setuid, I attempted to fix the problem
myself with the following results:

cd /usr/bin

ls -l netstat

-rwxrwxr-x 1 root root 50800 Aug 23 04:00 netstat*

chmod u+s netstat

netstat: Invalid argument

chmod 4775 netstat

netstat: Invalid argument

ls -l netstat

-rwxrwxr-x 1 root root 50800 Aug 23 04:00 netstat*

touch x

ls -l x

-rw-rw-r-- 1 root root 0 Dec 21 17:34 x

chmod 4775 x

ls -l x

-rwsrwxr-x 1 root root 0 Dec 21 17:34 x*

So why can’t I set the setuid bit on netstat?

I’ll bet it is a package file system oddity! :frowning:

Maybe if you copy netstat to /tmp, then copy it back, then try
the chmod.

-David

QNX Training Services
dagibbs@qnx.com

David Gibbs <dagibbs@qnx.com> wrote:

Will Parsons <> wbp@ysnet.net> > wrote:

Thank you for your help. That was the answer. I’m happy enough running
netstat as root, but I do have a further question…

After verifying that netstat was not setuid, I attempted to fix the problem
myself with the following results:

cd /usr/bin

ls -l netstat

-rwxrwxr-x 1 root root 50800 Aug 23 04:00 netstat*

chmod u+s netstat

netstat: Invalid argument

chmod 4775 netstat

netstat: Invalid argument

ls -l netstat

-rwxrwxr-x 1 root root 50800 Aug 23 04:00 netstat*

touch x

ls -l x

-rw-rw-r-- 1 root root 0 Dec 21 17:34 x

chmod 4775 x

ls -l x

-rwsrwxr-x 1 root root 0 Dec 21 17:34 x*

So why can’t I set the setuid bit on netstat?

I’ll bet it is a package file system oddity! > :frowning:

Maybe if you copy netstat to /tmp, then copy it back, then try
the chmod.

-David

Wow. Yep, I tried that and it solves the problem, but I am completely
mystified as to why. What is this “package file system”? /usr/bin and
/tmp are on the same QNX partition of a disk. (Actually, I did things
in a slightly different order, copying netstat to /tmp. chmod, and
copying /tmp/netstat back to /usr/bin.)

  • Will

Will Parsons | wbparsons@Ysnet.net
(To reply: remove Y from e-mail address)

Will Parsons <wbp@ysnet.net> wrote:
: David Gibbs <dagibbs@qnx.com> wrote:
:>Will Parsons <wbp@ysnet.net> wrote:
:>
:>I’ll bet it is a package file system oddity! :frowning:
:>
:>Maybe if you copy netstat to /tmp, then copy it back, then try
:>the chmod.

That will not work you’ll have to chmod in /tmp or /var/pkg/spill/…
Meaning the package file does not let chmod pass thru.

:>
:>-David

: Wow. Yep, I tried that and it solves the problem, but I am completely
: mystified as to why. What is this “package file system”? /usr/bin and
: /tmp are on the same QNX partition of a disk. (Actually, I did things
: in a slightly different order, copying netstat to /tmp. chmod, and
: copying /tmp/netstat back to /usr/bin.)

Look in the helpviewer there is a chapter on this espcially the
paragraph call “spilling”, you just “spilled” netstat, the package file
system will now retrieve netstat from /var/pkg/spill/x86/usr/bin/netstat
or something instead of the pkg repository

if you do for example

/usr/sbin/pkgctl -i /usr/bin/netstat

this will indicate where the file is retreive and if it was spilled
You can then chmod the spilled binary.

best luck

\

au revoir, alain

Aussi haut que l’on soit assis, on n’est toujours assis que sur son cul !!!

“Alain Magloire” <alain@qnx.com> wrote in message
news:91vs07$etn$1@nntp.qnx.com

Will Parsons <> wbp@ysnet.net> > wrote:
: David Gibbs <> dagibbs@qnx.com> > wrote:
:>Will Parsons <> wbp@ysnet.net> > wrote:
:
:>I’ll bet it is a package file system oddity! > :frowning:
:
:>Maybe if you copy netstat to /tmp, then copy it back, then try
:>the chmod.

That will not work you’ll have to chmod in /tmp or /var/pkg/spill/…
Meaning the package file does not let chmod pass thru.

:
:>-David

: Wow. Yep, I tried that and it solves the problem, but I am completely
: mystified as to why. What is this “package file system”? /usr/bin

What makes you beleive /usr/bin is a physical directory :wink:

Look in the helpviewer there is a chapter on this espcially the
paragraph call “spilling”, you just “spilled” netstat, the package file
system will now retrieve netstat from /var/pkg/spill/x86/usr/bin/netstat
or something instead of the pkg repository

if you do for example

/usr/sbin/pkgctl -i /usr/bin/netstat

this will indicate where the file is retreive and if it was spilled
You can then chmod the spilled binary.

best luck

\

au revoir, alain

Aussi haut que l’on soit assis, on n’est toujours assis que sur son cul
!!!

Mario Charest <mcharest@void_zinformatic.com> wrote:

“Alain Magloire” <> alain@qnx.com> > wrote in message
news:91vs07$etn$> 1@nntp.qnx.com> …
Will Parsons <> wbp@ysnet.net> > wrote:
: David Gibbs <> dagibbs@qnx.com> > wrote:
:>Will Parsons <> wbp@ysnet.net> > wrote:
:
:>I’ll bet it is a package file system oddity! > :frowning:
:
:>Maybe if you copy netstat to /tmp, then copy it back, then try
:>the chmod.

That will not work you’ll have to chmod in /tmp or /var/pkg/spill/…
Meaning the package file does not let chmod pass thru.

:
:>-David

: Wow. Yep, I tried that and it solves the problem, but I am completely
: mystified as to why. What is this “package file system”? /usr/bin

What makes you beleive /usr/bin is a physical directory > :wink:

Look in the helpviewer there is a chapter on this espcially the
paragraph call “spilling”, you just “spilled” netstat, the package file
system will now retrieve netstat from /var/pkg/spill/x86/usr/bin/netstat
or something instead of the pkg repository

if you do for example

/usr/sbin/pkgctl -i /usr/bin/netstat

this will indicate where the file is retreive and if it was spilled
You can then chmod the spilled binary.

best luck

Thanks to all who responded. I will investigate “spilling” in the helpviewer.
Obviously, QNX RTP is going to be an adventure, but that’s all right, I’m
having a lot of fun.

Have a happy Christmas.

=========================================
Will Parsons | wbparsons@Ysnet.net
(To reply: remove Y from e-mail address)