Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-05-01 Thread David Wright
On Mon 01 May 2017 at 14:48:13 (-0400), Greg Wooledge wrote:
> On Mon, May 01, 2017 at 01:18:58PM -0500, David Wright wrote:
> > They do. Both expect a command. You can "show" something but you can't
> > "dev" it or, at least, I don't know how to.
> 
> The surprise comes from the fact that typically you can add "dev eth0"
> to the end of one working ip command, to get another working ip command
> which is restricted to that one interface -- but not always.
> 
> ip addr show (working)
> ip addr show dev eth0 (working)
> 
> But
> 
> ip addr (working)
> ip addr dev eth0 (NOT working)
> 
> And
> 
> ip -s link show (working)
> ip -s link show dev eth0 (working)
> 
> But
> 
> ip -s link (working)
> ip -s link dev eth0 (NOT working)
> 
> Apparently, in order to understand why half of the commands work and
> half do not, you have to somehow figure out that you're currently using
> a command with an assumed verb, and that this makes a difference, in
> some way, if you try to add words that follow the assumed verb.  Like,
> "the verb is only added if the parser runs out of words" or something.

I'd assumed that the presumption of "show [everything]" was there
because non-root users can do little else, and I don't think you can
omit/assume any other verb. cf mount.

> The inconsistency is quite confusing, especially if you haven't
> scientifically attempted EVERY combination of words yet, to see which
> combinations work and which do not, in order to analyze it for patterns
> and infer the actual grammar rules.

Sure, but who would prefer "ip link" to give you a load of its BNF
rather than assuming you meant show. "ip" does give you BNF, it's
true, but with such a flexible command, where to start. "ip nt"
already fills the screen; only 16 more object types to go.

Cheers,
David.



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-05-01 Thread David Wright
On Wed 26 Apr 2017 at 15:26:36 (-0500), Richard Owlett wrote:
> On 04/26/2017 10:02 AM, Lisi Reisz wrote:
> >But did /sbin/ifconfig work?
> >
> 
>  Had no reason to try.
> Whenever I come across a command that *SHOULD* work, but does not,
> the first diagnostic step is attempt to run the *IDENTICAL* command
> as root.
> In the *MAJORITY* of cases that it runs demonstrates that someone at
> sometime decided to restrict some computer owners from using their
> own computer in a reasonable manner.

Which merely begs the question. The meaning of "*should* work
as non-root" is defined by your workaround.

> Remember Linux borrows heavily from an OS designed in another era
> for a another audience. I have yet to run across a case where any
> distinction should be made between "user richard" and "user root". I
> do not take that as necessary and sufficient conditions to abolish
> questionable conventions. They might be occasionally valuable.

That's a nice explanation of why I wrote last year a sentence that
you didn't understand:

  The usefulness of many suggestions is limited, of course, by the OPs
  insistence that a horse and cart is driven through the unix security
  model merely because the OP never connects anything to the internet
  (which is insane).

https://lists.debian.org/debian-user/2016/11/msg00903.html

I guess you were happier with DOS.

> In the age of laptops, tablets, and so-called "smart phones" I think
> the more relevant basic distinction would be between "physically
> local user" and "physically external user".

So how is anyone able to configure a computer for their naive family,
say, to use.

> Haven't yet figured out what to propose that wouldn't "throw baby
> out with the bath water".

The same answer, then, as I gave you for your proposed vague changes
to the man pages.

Cheers,
David.



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-05-01 Thread Greg Wooledge
On Mon, May 01, 2017 at 01:18:58PM -0500, David Wright wrote:
> They do. Both expect a command. You can "show" something but you can't
> "dev" it or, at least, I don't know how to.

The surprise comes from the fact that typically you can add "dev eth0"
to the end of one working ip command, to get another working ip command
which is restricted to that one interface -- but not always.

ip addr show (working)
ip addr show dev eth0 (working)

But

ip addr (working)
ip addr dev eth0 (NOT working)

And

ip -s link show (working)
ip -s link show dev eth0 (working)

But

ip -s link (working)
ip -s link dev eth0 (NOT working)

Apparently, in order to understand why half of the commands work and
half do not, you have to somehow figure out that you're currently using
a command with an assumed verb, and that this makes a difference, in
some way, if you try to add words that follow the assumed verb.  Like,
"the verb is only added if the parser runs out of words" or something.

The inconsistency is quite confusing, especially if you haven't
scientifically attempted EVERY combination of words yet, to see which
combinations work and which do not, in order to analyze it for patterns
and infer the actual grammar rules.



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-05-01 Thread David Wright
On Wed 26 Apr 2017 at 09:36:36 (-0500), Richard Owlett wrote:
> On 04/26/2017 07:50 AM, Darac Marjal wrote:
> >On Wed, Apr 26, 2017 at 08:35:44AM -0400, Greg Wooledge wrote:
> >>On Wed, Apr 26, 2017 at 01:25:18PM +0100, Darac Marjal wrote:
> >>>For interface statistics from ip, try "ip -s link [interface]".
> >>
> >>On stretch:
> >>
> >>wooledg:~$ ip -s link eth0
> >>Command "eth0" is unknown, try "ip link help".
> >>
> >>wooledg:~$ ip -s link dev eth0
> >>Command "dev" is unknown, try "ip link help".
> >>
> >>wooledg:~$ ip link help
> >>[... enormous BNF dump, entirely missing -s, or any reference whatsoever
> >>to the fact that you can stick options between "ip" and "link" ...]
> >>
> >>wooledg:~$ ip -s link show eth0
> >>2: eth0:  mtu 1500 qdisc pfifo_fast
> >>state UP mode DEFAULT group default qlen 1000
> >>   link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff
> >>   RX: bytes  packets  errors  dropped overrun mcast
> >>   380719013  1442490  0   0   0   4731
> >>   TX: bytes  packets  errors  dropped carrier collsns
> >>   57971257   614586   0   0   0   0
> >>
> >>Aha!
> >
> >My bad. I actually only got as far as discovering "ip -s link" on my own
> >system. As I was typing up the email I remembered that Richard was after
> >statistics for a specific interface. I should have been more diligent in
> >working out the correct format.
> >
> >>
> >>(Sadly, this is my *typical* experience with the ip command -- trying
> >>random things until one of them works, because the documentation
> >>is impenetrable, and the syntax barely guessable, and certainly not
> >>predictable.)
> >
> >ip *could* do a lot better, it's true. As a monolithic tool, there's not
> >really much excuse for the different sub-tools to parse the commands
> >differently. As you say, "ip address" expects the device to be expressed
> >as "dev eth0", so why doesn't "ip link" handle it the same way? I don't
> >know.
> 
> 
> I would go further saying iproute2 is non-functional due to being
> functionally un-documented.
> 
> https://manpages.debian.org/jessie/iproute2/ip.8.en.html is useless.

It is if you want to know exactly what you can do with one of
the seventeen different objects it can handle. If you want to
know what those objects are, or what options are available, it's
not useless.

> Functional commands, for this thread's topic would be
>   ip -s link
> or
>   ip -s link ls usb0
> 
> No hint of either in so-called man page.
> 
> I accidentally discovered it by following up links when doing
> DuckDuckGo search for "documentation iproute2" (w/o quotes).
> 
> I then did another netinst of testing. There is some subset of the
> "ip" command available after the network has been configured. The
> help is too abbreviated to be useful.

Not at all. The abbreviated help shows you what's available
during the installation process which, as you have noticed,
is often a subset.

Having ascertained that subset, you now know which parts of the
main documentation, available in various locations, still apply.

You seem to want the cut-down man pages to be included in the
installation, which is a surprise coming from someone who seems
concerned about bandwidth almost to the point of obsession.

Cheers,
David.



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-05-01 Thread David Wright
On Wed 26 Apr 2017 at 13:50:15 (+0100), Darac Marjal wrote:
> On Wed, Apr 26, 2017 at 08:35:44AM -0400, Greg Wooledge wrote:
> >On Wed, Apr 26, 2017 at 01:25:18PM +0100, Darac Marjal wrote:
> >>For interface statistics from ip, try "ip -s link [interface]".
> >
> >On stretch:
> >
> >wooledg:~$ ip -s link eth0
> >Command "eth0" is unknown, try "ip link help".
> >
> >wooledg:~$ ip -s link dev eth0
> >Command "dev" is unknown, try "ip link help".
> >
> >wooledg:~$ ip link help
> >[... enormous BNF dump, entirely missing -s, or any reference whatsoever
> >to the fact that you can stick options between "ip" and "link" ...]

Presumably you realisd that the options to ip are documented in
man ip   and summarised in   ip help. Otherwise, this has to be
duplicated and maintained seventeen times.

> >wooledg:~$ ip -s link show eth0
> >2: eth0:  mtu 1500 qdisc pfifo_fast state 
> >UP mode DEFAULT group default qlen 1000
> >   link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff
> >   RX: bytes  packets  errors  dropped overrun mcast
> >   380719013  1442490  0   0   0   4731
> >   TX: bytes  packets  errors  dropped carrier collsns
> >   57971257   614586   0   0   0   0
> >
> >Aha!
> 
> My bad. I actually only got as far as discovering "ip -s link" on my own
> system. As I was typing up the email I remembered that Richard was after
> statistics for a specific interface. I should have been more diligent in
> working out the correct format.
> 
> >
> >(Sadly, this is my *typical* experience with the ip command -- trying
> >random things until one of them works, because the documentation
> >is impenetrable, and the syntax barely guessable, and certainly not
> >predictable.)
> 
> ip *could* do a lot better, it's true. As a monolithic tool, there's not
> really much excuse for the different sub-tools to parse the commands
> differently. As you say, "ip address" expects the device to be expressed
> as "dev eth0", so why doesn't "ip link" handle it the same way? I don't
> know.

They do. Both expect a command. You can "show" something but you can't
"dev" it or, at least, I don't know how to.

Cheers,
David.



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-27 Thread Fungi4All
 Original Message 
Subject: Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet 
useage?]
UTC Time: April 26, 2017 8:26 PM
From: rowl...@cloud85.net

In the *MAJORITY* of cases that it runs demonstrates that someone at
sometime decided to restrict some computer owners from using their own
computer in a reasonable manner.

Are you saying debian is not designed for users but for sys-admins as owners?
I assume if you are a confident sys-adm and single user then you can run it as 
root and have no users or create a user with identical rights to root. But for 
debian and most linux/unix derivatives to have it plastered all over the place 
to rarely if ever use root, I assume and can think of reasons. If your 
significant other uses it and you get into a fight he/she might destroy your 
system, or your kid, or your neighbor who uses it as a server for his 
connection to the world.

Remember Linux borrows heavily from an OS designed in another era for a
another audience.

Can you explain what era and audience was this and how has it changed?

I have yet to run across a case where any distinction
should be made between "user richard" and "user root".

That is because those who run 6 servers and 300,000 users based on the same 
installation you had would have a stroke hearing something like this. Can you 
run a webmail server and administer it off of your system?
What it sounds like you are asking for is a Debian-workstation and a 
Debian-enterprise as separate systems in a way the 1st would never be able to 
be transformed into the 2nd.

I do not take
that as necessary and sufficient conditions to abolish questionable
conventions. They might be occasionally valuable.

In the age of laptops, tablets, and so-called "smart phones" I think the
more relevant basic distinction would be between "physically local user"
and "physically external user".

How about a coffee shop with dummy terminals all connected to a pc-server?
You would be the coffee-shop owner and use the pc as your workstation as well. 
The rest would be ?external? users?

Haven't yet figured out what to propose that wouldn't "throw baby out
with the bath water".

So you are wasting bandwidth without a proposal.
You want something to change but don't know what yet.

-freak

Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-27 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Apr 26, 2017 at 03:26:36PM -0500, Richard Owlett wrote:

[...]

> Whenever I come across a command that *SHOULD* work, but does not,
> the first diagnostic step is attempt to run the *IDENTICAL* command
> as root.

Now you know better: you were holding it wrong.

cheers
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlkBkrIACgkQBcgs9XrR2kZUIACffBPd+HfOSjcIDSsxuYdvcwL0
4iIAnitbWWZOm47UI5L79ditgZ/OEiU4
=uXWx
-END PGP SIGNATURE-



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Richard Owlett

On 04/26/2017 10:02 AM, Lisi Reisz wrote:

On Wednesday 26 April 2017 15:36:36 Richard Owlett wrote:

On 04/26/2017 07:50 AM, Darac Marjal wrote:

On Wed, Apr 26, 2017 at 08:35:44AM -0400, Greg Wooledge wrote:

On Wed, Apr 26, 2017 at 01:25:18PM +0100, Darac Marjal wrote:

For interface statistics from ip, try "ip -s link [interface]".


On stretch:

wooledg:~$ ip -s link eth0
Command "eth0" is unknown, try "ip link help".

wooledg:~$ ip -s link dev eth0
Command "dev" is unknown, try "ip link help".

wooledg:~$ ip link help
[... enormous BNF dump, entirely missing -s, or any reference whatsoever
to the fact that you can stick options between "ip" and "link" ...]

wooledg:~$ ip -s link show eth0
2: eth0:  mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT group default qlen 1000
   link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff
   RX: bytes  packets  errors  dropped overrun mcast
   380719013  1442490  0   0   0   4731
   TX: bytes  packets  errors  dropped carrier collsns
   57971257   614586   0   0   0   0

Aha!


My bad. I actually only got as far as discovering "ip -s link" on my own
system. As I was typing up the email I remembered that Richard was after
statistics for a specific interface. I should have been more diligent in
working out the correct format.


(Sadly, this is my *typical* experience with the ip command -- trying
random things until one of them works, because the documentation
is impenetrable, and the syntax barely guessable, and certainly not
predictable.)


ip *could* do a lot better, it's true. As a monolithic tool, there's not
really much excuse for the different sub-tools to parse the commands
differently. As you say, "ip address" expects the device to be expressed
as "dev eth0", so why doesn't "ip link" handle it the same way? I don't
know.


I would go further saying iproute2 is non-functional due to being
functionally un-documented.

https://manpages.debian.org/jessie/iproute2/ip.8.en.html is useless.

Functional commands, for this thread's topic would be
   ip -s link
or
   ip -s link ls usb0

No hint of either in so-called man page.

I accidentally discovered it by following up links when doing DuckDuckGo
search for "documentation iproute2" (w/o quotes).

I then did another netinst of testing. There is some subset of the "ip"
command available after the network has been configured. The help is too
abbreviated to be useful.


But did /sbin/ifconfig work?



 Had no reason to try.
Whenever I come across a command that *SHOULD* work, but does not, the 
first diagnostic step is attempt to run the *IDENTICAL* command as root.
In the *MAJORITY* of cases that it runs demonstrates that someone at 
sometime decided to restrict some computer owners from using their own 
computer in a reasonable manner.


Remember Linux borrows heavily from an OS designed in another era for a 
another audience. I have yet to run across a case where any distinction 
should be made between "user richard" and "user root". I do not take 
that as necessary and sufficient conditions to abolish questionable 
conventions. They might be occasionally valuable.


In the age of laptops, tablets, and so-called "smart phones" I think the 
more relevant basic distinction would be between "physically local user" 
and "physically external user".


Haven't yet figured out what to propose that wouldn't "throw baby out 
with the bath water".










Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Curt
On 2017-04-26, Greg Wooledge  wrote:
> On Wed, Apr 26, 2017 at 10:25:10AM -0400, Ric Moore wrote:
>> On 04/26/2017 10:17 AM, Greg Wooledge wrote:
>> >On Wed, Apr 26, 2017 at 10:07:01AM -0400, Ric Moore wrote:
>> >>"ifconfig" has to be run as root.
>
>> >This is not correct, if you are just using it to view an interface rather
>> >than to change the interface.
>
>> And that makes me incorrect how??
>
> Because your statement is literally untrue.  You said a thing which does
> not match reality.
>

It's an alternative fact, I think. I've always run ifconfig as a user using the
full path--/sbin/ifconfig (to get my ip address). 

But then there's ip, which *is* in my path

ip addr

I've seen people recommending ip as a superior alternative to ifconfig.

Anyway, I'm adding nothing of extra value to the thread, as usual.



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Jörg-Volker Peetz
Eduardo M KALINOWSKI wrote on 04/26/17 16:46:
> On Qua, 26 Abr 2017, Richard Owlett wrote:
>> I would go further saying iproute2 is non-functional due to being 
>> functionally
>> un-documented.
>>
>> https://manpages.debian.org/jessie/iproute2/ip.8.en.html is useless.
>>
>> Functional commands, for this thread's topic would be
>>   ip -s link
>> or
>>   ip -s link ls usb0
>>
>> No hint of either in so-called man page.
> 
> There are man pages for each command, such as
> https://manpages.debian.org/jessie/iproute2/ip-link.8.en.html . They're listed
> in the SEE ALSO section, but there could be a mention higher up in the text
> advising the user to consult the specific pages.
> 
> Also, typing 'man ip link' should work on the command line.
> 

I'll second this. The ip command is nearly as complex as git. The CLI help
is also usefull, like

$ ip help

and then

$ ip addr help

In the end, may be, you're satisfied with the output of

$ ip -s -h addr s eth0

-- 
Regards,
jvp.




Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Eduardo M KALINOWSKI

On Qua, 26 Abr 2017, Richard Owlett wrote:
I would go further saying iproute2 is non-functional due to being  
functionally un-documented.


https://manpages.debian.org/jessie/iproute2/ip.8.en.html is useless.

Functional commands, for this thread's topic would be
  ip -s link
or
  ip -s link ls usb0

No hint of either in so-called man page.


There are man pages for each command, such as  
https://manpages.debian.org/jessie/iproute2/ip-link.8.en.html .  
They're listed in the SEE ALSO section, but there could be a mention  
higher up in the text advising the user to consult the specific pages.


Also, typing 'man ip link' should work on the command line.


--
Eduardo M KALINOWSKI
edua...@kalinowski.com.br




Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Lisi Reisz
On Wednesday 26 April 2017 15:36:36 Richard Owlett wrote:
> On 04/26/2017 07:50 AM, Darac Marjal wrote:
> > On Wed, Apr 26, 2017 at 08:35:44AM -0400, Greg Wooledge wrote:
> >> On Wed, Apr 26, 2017 at 01:25:18PM +0100, Darac Marjal wrote:
> >>> For interface statistics from ip, try "ip -s link [interface]".
> >>
> >> On stretch:
> >>
> >> wooledg:~$ ip -s link eth0
> >> Command "eth0" is unknown, try "ip link help".
> >>
> >> wooledg:~$ ip -s link dev eth0
> >> Command "dev" is unknown, try "ip link help".
> >>
> >> wooledg:~$ ip link help
> >> [... enormous BNF dump, entirely missing -s, or any reference whatsoever
> >> to the fact that you can stick options between "ip" and "link" ...]
> >>
> >> wooledg:~$ ip -s link show eth0
> >> 2: eth0:  mtu 1500 qdisc pfifo_fast
> >> state UP mode DEFAULT group default qlen 1000
> >>link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff
> >>RX: bytes  packets  errors  dropped overrun mcast
> >>380719013  1442490  0   0   0   4731
> >>TX: bytes  packets  errors  dropped carrier collsns
> >>57971257   614586   0   0   0   0
> >>
> >> Aha!
> >
> > My bad. I actually only got as far as discovering "ip -s link" on my own
> > system. As I was typing up the email I remembered that Richard was after
> > statistics for a specific interface. I should have been more diligent in
> > working out the correct format.
> >
> >> (Sadly, this is my *typical* experience with the ip command -- trying
> >> random things until one of them works, because the documentation
> >> is impenetrable, and the syntax barely guessable, and certainly not
> >> predictable.)
> >
> > ip *could* do a lot better, it's true. As a monolithic tool, there's not
> > really much excuse for the different sub-tools to parse the commands
> > differently. As you say, "ip address" expects the device to be expressed
> > as "dev eth0", so why doesn't "ip link" handle it the same way? I don't
> > know.
>
> I would go further saying iproute2 is non-functional due to being
> functionally un-documented.
>
> https://manpages.debian.org/jessie/iproute2/ip.8.en.html is useless.
>
> Functional commands, for this thread's topic would be
>ip -s link
> or
>ip -s link ls usb0
>
> No hint of either in so-called man page.
>
> I accidentally discovered it by following up links when doing DuckDuckGo
> search for "documentation iproute2" (w/o quotes).
>
> I then did another netinst of testing. There is some subset of the "ip"
> command available after the network has been configured. The help is too
> abbreviated to be useful.

But did /sbin/ifconfig work?

Lisi



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Richard Owlett

On 04/26/2017 07:50 AM, Darac Marjal wrote:

On Wed, Apr 26, 2017 at 08:35:44AM -0400, Greg Wooledge wrote:

On Wed, Apr 26, 2017 at 01:25:18PM +0100, Darac Marjal wrote:

For interface statistics from ip, try "ip -s link [interface]".


On stretch:

wooledg:~$ ip -s link eth0
Command "eth0" is unknown, try "ip link help".

wooledg:~$ ip -s link dev eth0
Command "dev" is unknown, try "ip link help".

wooledg:~$ ip link help
[... enormous BNF dump, entirely missing -s, or any reference whatsoever
to the fact that you can stick options between "ip" and "link" ...]

wooledg:~$ ip -s link show eth0
2: eth0:  mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT group default qlen 1000
   link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff
   RX: bytes  packets  errors  dropped overrun mcast
   380719013  1442490  0   0   0   4731
   TX: bytes  packets  errors  dropped carrier collsns
   57971257   614586   0   0   0   0

Aha!


My bad. I actually only got as far as discovering "ip -s link" on my own
system. As I was typing up the email I remembered that Richard was after
statistics for a specific interface. I should have been more diligent in
working out the correct format.



(Sadly, this is my *typical* experience with the ip command -- trying
random things until one of them works, because the documentation
is impenetrable, and the syntax barely guessable, and certainly not
predictable.)


ip *could* do a lot better, it's true. As a monolithic tool, there's not
really much excuse for the different sub-tools to parse the commands
differently. As you say, "ip address" expects the device to be expressed
as "dev eth0", so why doesn't "ip link" handle it the same way? I don't
know.



I would go further saying iproute2 is non-functional due to being 
functionally un-documented.


https://manpages.debian.org/jessie/iproute2/ip.8.en.html is useless.

Functional commands, for this thread's topic would be
  ip -s link
or
  ip -s link ls usb0

No hint of either in so-called man page.

I accidentally discovered it by following up links when doing DuckDuckGo 
search for "documentation iproute2" (w/o quotes).


I then did another netinst of testing. There is some subset of the "ip" 
command available after the network has been configured. The help is too 
abbreviated to be useful.






Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Greg Wooledge
On Wed, Apr 26, 2017 at 10:25:10AM -0400, Ric Moore wrote:
> On 04/26/2017 10:17 AM, Greg Wooledge wrote:
> >On Wed, Apr 26, 2017 at 10:07:01AM -0400, Ric Moore wrote:
> >>"ifconfig" has to be run as root.

> >This is not correct, if you are just using it to view an interface rather
> >than to change the interface.

> And that makes me incorrect how??

Because your statement is literally untrue.  You said a thing which does
not match reality.

wooledg:~$ id
uid=1000(wooledg) gid=1000(wooledg) 
groups=1000(wooledg),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(netdev)
wooledg:~$ /sbin/ifconfig
eth0: flags=4163  mtu 1500
inet 10.76.172.97  netmask 255.255.254.0  broadcast 10.76.173.255
inet6 fe80::a28c:fdff:fec3:89e0  prefixlen 64  scopeid 0x20
ether a0:8c:fd:c3:89:e0  txqueuelen 1000  (Ethernet)
RX packets 1575652  bytes 408905635 (389.9 MiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 708994  bytes 65901838 (62.8 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 16  memory 0xd100-d102  

lo: flags=73  mtu 65536
inet 127.0.0.1  netmask 255.0.0.0
inet6 ::1  prefixlen 128  scopeid 0x10
loop  txqueuelen 1  (Local Loopback)
RX packets 1270503  bytes 260699031 (248.6 MiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 1270503  bytes 260699031 (248.6 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Apr 26, 2017 at 10:07:01AM -0400, Ric Moore wrote:
> On 04/26/2017 08:36 AM, Brian wrote:
> >On Wed 26 Apr 2017 at 07:17:11 -0500, Richard Owlett wrote:
> >
> >>On 04/25/2017 08:17 AM, Richard Owlett wrote:
> >>>On 04/24/2017 04:12 PM, Ben Caradoc-Davies wrote:
> On 24/04/17 22:58, Richard Owlett wrote:
> >If there were user accessible registers with a running total of
> >uploaded/downloaded data since device power on would be almost ideal
> >granularity.
> 
> Is ifconfig available on a console during installation?
> >>>
> >>>I can not check at the moment.
> >>
> >>I attempted to check this morning using
> >>  debian-stretch-DI-rc3-i386-netinst.iso
> >>
> >>I did an install using expert mode, not selecting any GUI.
> >>At several points during the install I did Alt-F2 to bring up a terminal to
> >>attempt running ifconfig.
> >>
> >>"Command not found" was the uniform response.
> >>I booted the new install and attempted as root to run ifconfig.
> >>I again got "Command not found".
> >>That seemed odd.
> >>
> >>Having previously done an install using the same ISO and having selected the
> >>MATE desktop, I repeated the above with the same error.
> >>
> >>I have no problem running ifconfig under Squeeze (8.6.0).
> >>
> >>Is it "bug" or "operator error"?
> >
> >Let us see how a reasonably experienced user could have investigated the
> >cause. The package which provides ifconfig can be found from 'dpkg -S'
> >on a machine which has it. Or from the packages page on the Debian web
> >site,
> >
> >The ISO can be opened up (I use mc) and the /pool/main directory entered.
> >Go to "n". See it? No? Not a bug, then.
> 
> 
> "ifconfig" has to be run as root.

If you want to change something, yes. If not -- no.

Perhaps you're being misled by the fact that ifconfig usually lives in
/usr/bin, which usually isn't in a regular user's path, Therefore, just
invoking "ifconfig" as a regular user ends (usually) like so:

  tomas@rasputin:~$ ifconfig
  bash: ifconfig: command not found

That means your shell isn't finding the command. That *doesn't mean" you
are not allowed to invoke it (nor is that the message on the wrapping :)

Try with full path:

  tomas@rasputin:~$ /sbin/ifconfig
  eth0  Link encap:Ethernet  HWaddr f0:de:f1:71:84:41  
inet addr:10.10.69.65  Bcast:10.10.69.127  Mask:255.255.255.128
[blah blah blah]

Now if you tried to change the IP address as a regular user...

  tomas@rasputin:~$ /sbin/ifconfig eth0 10.10.69.66
  SIOCSIFADDR: Operation not permitted
  SIOCSIFFLAGS: Operation not permitted

Ouch. My operating system scolded me. *That* was an authorization failure
(and not a "command not found"). "Read the message" [1]


Cheers

[1] Ed Krol "The Whole Internet User's Guide and Catalog"
https://en.wikipedia.org/wiki/Whole_Internet_User%27s_Guide_and_Catalog

- - tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlkArvkACgkQBcgs9XrR2kaP0ACeKzkAIB7kffOm19P9FhmDW+PY
CI0An2cd8dqSc09os2XdGZ/0cgbLN6eL
=DgK8
-END PGP SIGNATURE-



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Ric Moore

On 04/26/2017 10:17 AM, Greg Wooledge wrote:

On Wed, Apr 26, 2017 at 10:07:01AM -0400, Ric Moore wrote:

"ifconfig" has to be run as root.
ric@iam:~$ sudo ifconfig
[sudo] password for ric:
enp8s0: flags=4163  mtu 1500


This is not correct, if you are just using it to view an interface rather
than to change the interface.

ifconfig lives in the /sbin directory, which is not in the default PATH
that user accounts get when they login.  It *is* in the PATH that you
get when you run su, or sudo.  That's why it works when you slap sudo
in front of it.

You could also simply run /sbin/ifconfig directly.  Or, you could change
your PATH variable to include the /sbin directory.  Either of these will
let you run ifconfig without root privileges.


And that makes me incorrect how?? For a new user, who doesn't want to 
dink with $PATH, su or sudo will run ifconfig. It doesn't run, out of 
the box, as USER, which was the OP's original issue. Ric

.


--
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Greg Wooledge
On Wed, Apr 26, 2017 at 10:07:01AM -0400, Ric Moore wrote:
> "ifconfig" has to be run as root.
> ric@iam:~$ sudo ifconfig
> [sudo] password for ric:
> enp8s0: flags=4163  mtu 1500

This is not correct, if you are just using it to view an interface rather
than to change the interface.

ifconfig lives in the /sbin directory, which is not in the default PATH
that user accounts get when they login.  It *is* in the PATH that you
get when you run su, or sudo.  That's why it works when you slap sudo
in front of it.

You could also simply run /sbin/ifconfig directly.  Or, you could change
your PATH variable to include the /sbin directory.  Either of these will
let you run ifconfig without root privileges.



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Ric Moore

On 04/26/2017 08:36 AM, Brian wrote:

On Wed 26 Apr 2017 at 07:17:11 -0500, Richard Owlett wrote:


On 04/25/2017 08:17 AM, Richard Owlett wrote:

On 04/24/2017 04:12 PM, Ben Caradoc-Davies wrote:

On 24/04/17 22:58, Richard Owlett wrote:

If there were user accessible registers with a running total of
uploaded/downloaded data since device power on would be almost ideal
granularity.


Is ifconfig available on a console during installation?


I can not check at the moment.


I attempted to check this morning using
  debian-stretch-DI-rc3-i386-netinst.iso

I did an install using expert mode, not selecting any GUI.
At several points during the install I did Alt-F2 to bring up a terminal to
attempt running ifconfig.

"Command not found" was the uniform response.
I booted the new install and attempted as root to run ifconfig.
I again got "Command not found".
That seemed odd.

Having previously done an install using the same ISO and having selected the
MATE desktop, I repeated the above with the same error.

I have no problem running ifconfig under Squeeze (8.6.0).

Is it "bug" or "operator error"?


Let us see how a reasonably experienced user could have investigated the
cause. The package which provides ifconfig can be found from 'dpkg -S'
on a machine which has it. Or from the packages page on the Debian web
site,

The ISO can be opened up (I use mc) and the /pool/main directory entered.
Go to "n". See it? No? Not a bug, then.



"ifconfig" has to be run as root.
ric@iam:~$ sudo ifconfig
[sudo] password for ric:
enp8s0: flags=4163  mtu 1500
inet 192.168.0.3  netmask 255.255.255.0  broadcast 192.168.0.255
inet6 fe80::16da:e9ff:fe09:4706  prefixlen 64  scopeid 0x20
ether 14:da:e9:09:47:06  txqueuelen 1000  (Ethernet)
RX packets 6879  bytes 3709031 (3.7 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 6276  bytes 596404 (596.4 KB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 35  base 0x9000

lo: flags=73  mtu 65536
inet 127.0.0.1  netmask 255.0.0.0
inet6 ::1  prefixlen 128  scopeid 0x10
loop  txqueuelen 1000  (Local Loopback)
RX packets 88693  bytes 15355517 (15.3 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 88693  bytes 15355517 (15.3 MB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ric@iam:~$




--
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Apr 26, 2017 at 01:50:15PM +0100, Darac Marjal wrote:
> On Wed, Apr 26, 2017 at 08:35:44AM -0400, Greg Wooledge wrote:
> >On Wed, Apr 26, 2017 at 01:25:18PM +0100, Darac Marjal wrote:
> >>For interface statistics from ip, try "ip -s link [interface]".
> >
> >On stretch:
> >
> >wooledg:~$ ip -s link eth0
> >Command "eth0" is unknown, try "ip link help".
> >
> >wooledg:~$ ip -s link dev eth0
> >Command "dev" is unknown, try "ip link help".
> >
> >wooledg:~$ ip link help
> >[... enormous BNF dump, entirely missing -s, or any reference whatsoever
> >to the fact that you can stick options between "ip" and "link" ...]
> >
> >wooledg:~$ ip -s link show eth0
> >2: eth0:  mtu 1500 qdisc pfifo_fast state 
> >UP mode DEFAULT group default qlen 1000
> >   link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff
> >   RX: bytes  packets  errors  dropped overrun mcast
> >   380719013  1442490  0   0   0   4731
> >   TX: bytes  packets  errors  dropped carrier collsns
> >   57971257   614586   0   0   0   0
> >
> >Aha!
> 
> My bad [...]

I'd say "ip's bad"

> ip *could* do a lot better [...]

That's why I end up (after re-trying ip for a short while) installing
net-tools. Every single time.

regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlkAohkACgkQBcgs9XrR2kYaPwCfZXHlL7f7pCcRZjLYHPHumCmu
0aMAnRjNW482CD5j5LKehIaR8VgM6N46
=1vqx
-END PGP SIGNATURE-



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Darac Marjal

On Wed, Apr 26, 2017 at 08:35:44AM -0400, Greg Wooledge wrote:

On Wed, Apr 26, 2017 at 01:25:18PM +0100, Darac Marjal wrote:

For interface statistics from ip, try "ip -s link [interface]".


On stretch:

wooledg:~$ ip -s link eth0
Command "eth0" is unknown, try "ip link help".

wooledg:~$ ip -s link dev eth0
Command "dev" is unknown, try "ip link help".

wooledg:~$ ip link help
[... enormous BNF dump, entirely missing -s, or any reference whatsoever
to the fact that you can stick options between "ip" and "link" ...]

wooledg:~$ ip -s link show eth0
2: eth0:  mtu 1500 qdisc pfifo_fast state UP 
mode DEFAULT group default qlen 1000
   link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff
   RX: bytes  packets  errors  dropped overrun mcast
   380719013  1442490  0   0   0   4731
   TX: bytes  packets  errors  dropped carrier collsns
   57971257   614586   0   0   0   0

Aha!


My bad. I actually only got as far as discovering "ip -s link" on my own
system. As I was typing up the email I remembered that Richard was after
statistics for a specific interface. I should have been more diligent in
working out the correct format.



(Sadly, this is my *typical* experience with the ip command -- trying
random things until one of them works, because the documentation
is impenetrable, and the syntax barely guessable, and certainly not
predictable.)


ip *could* do a lot better, it's true. As a monolithic tool, there's not
really much excuse for the different sub-tools to parse the commands
differently. As you say, "ip address" expects the device to be expressed
as "dev eth0", so why doesn't "ip link" handle it the same way? I don't
know.

--
For more information, please reread.


signature.asc
Description: PGP signature


Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Brian
On Wed 26 Apr 2017 at 07:17:11 -0500, Richard Owlett wrote:

> On 04/25/2017 08:17 AM, Richard Owlett wrote:
> >On 04/24/2017 04:12 PM, Ben Caradoc-Davies wrote:
> >>On 24/04/17 22:58, Richard Owlett wrote:
> >>>If there were user accessible registers with a running total of
> >>>uploaded/downloaded data since device power on would be almost ideal
> >>>granularity.
> >>
> >>Is ifconfig available on a console during installation?
> >
> >I can not check at the moment.
> 
> I attempted to check this morning using
>   debian-stretch-DI-rc3-i386-netinst.iso
> 
> I did an install using expert mode, not selecting any GUI.
> At several points during the install I did Alt-F2 to bring up a terminal to
> attempt running ifconfig.
> 
> "Command not found" was the uniform response.
> I booted the new install and attempted as root to run ifconfig.
> I again got "Command not found".
> That seemed odd.
> 
> Having previously done an install using the same ISO and having selected the
> MATE desktop, I repeated the above with the same error.
> 
> I have no problem running ifconfig under Squeeze (8.6.0).
> 
> Is it "bug" or "operator error"?

Let us see how a reasonably experienced user could have investigated the
cause. The package which provides ifconfig can be found from 'dpkg -S'
on a machine which has it. Or from the packages page on the Debian web
site,

The ISO can be opened up (I use mc) and the /pool/main directory entered.
Go to "n". See it? No? Not a bug, then.

-- 
Brian.



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Greg Wooledge
On Wed, Apr 26, 2017 at 01:25:18PM +0100, Darac Marjal wrote:
> For interface statistics from ip, try "ip -s link [interface]".

On stretch:

wooledg:~$ ip -s link eth0
Command "eth0" is unknown, try "ip link help".

wooledg:~$ ip -s link dev eth0
Command "dev" is unknown, try "ip link help".

wooledg:~$ ip link help
[... enormous BNF dump, entirely missing -s, or any reference whatsoever
 to the fact that you can stick options between "ip" and "link" ...]

wooledg:~$ ip -s link show eth0
2: eth0:  mtu 1500 qdisc pfifo_fast state UP 
mode DEFAULT group default qlen 1000
link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff
RX: bytes  packets  errors  dropped overrun mcast   
380719013  1442490  0   0   0   4731
TX: bytes  packets  errors  dropped carrier collsns 
57971257   614586   0   0   0   0   

Aha!

(Sadly, this is my *typical* experience with the ip command -- trying
random things until one of them works, because the documentation
is impenetrable, and the syntax barely guessable, and certainly not
predictable.)



Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Jochen Spieker
Richard Owlett:
> 
> I did an install using expert mode, not selecting any GUI.
> At several points during the install I did Alt-F2 to bring up a terminal to
> attempt running ifconfig.
> 
> "Command not found" was the uniform response.
> I booted the new install and attempted as root to run ifconfig.
> I again got "Command not found".
> That seemed odd.

Did you check whether /sbin/ was in your $PATH at that time or did you
try to run it as /sbin/ifconfig? The problem may simply be that the
executable was not found in your $PATH although the executable was where
it should be.

(Apart from that I thought that ifconfig and friends were not really
necessary anymore since they were replaced by the "ip" tool. I think the
priority of this package was demoted from important to optional but I
cannot check at the moment. Maybe net-tools just isn't part of a
standard install anymore. If you want ifconfig, you need to install
net-tools.)

J.
-- 
Whenever I hear the word 'art' I reach for my visa card.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Darac Marjal

On Wed, Apr 26, 2017 at 07:17:11AM -0500, Richard Owlett wrote:

On 04/25/2017 08:17 AM, Richard Owlett wrote:

On 04/24/2017 04:12 PM, Ben Caradoc-Davies wrote:

On 24/04/17 22:58, Richard Owlett wrote:

If there were user accessible registers with a running total of
uploaded/downloaded data since device power on would be almost ideal
granularity.


Is ifconfig available on a console during installation?


I can not check at the moment.


I attempted to check this morning using
 debian-stretch-DI-rc3-i386-netinst.iso

I did an install using expert mode, not selecting any GUI.
At several points during the install I did Alt-F2 to bring up a 
terminal to attempt running ifconfig.


"Command not found" was the uniform response.
I booted the new install and attempted as root to run ifconfig.
I again got "Command not found".
That seemed odd.

Having previously done an install using the same ISO and having 
selected the MATE desktop, I repeated the above with the same error.


I have no problem running ifconfig under Squeeze (8.6.0).

Is it "bug" or "operator error"?


"ifconfig" was part of the "net-tools" package. Recently, though, this
has been deprecated in favour of the "iproute2" package. The main
difference is that "ifconfig", "route" and a few other tools are now
replaced by a single "ip" command. The interface to "ip", however, is
completely different.

For interface statistics from ip, try "ip -s link [interface]".


--
For more information, please reread.


signature.asc
Description: PGP signature


BUG or OPERATOR error? - was [Re: Measuring aggregate internet useage?]

2017-04-26 Thread Richard Owlett

On 04/25/2017 08:17 AM, Richard Owlett wrote:

On 04/24/2017 04:12 PM, Ben Caradoc-Davies wrote:

On 24/04/17 22:58, Richard Owlett wrote:

If there were user accessible registers with a running total of
uploaded/downloaded data since device power on would be almost ideal
granularity.


Is ifconfig available on a console during installation?


I can not check at the moment.


I attempted to check this morning using
  debian-stretch-DI-rc3-i386-netinst.iso

I did an install using expert mode, not selecting any GUI.
At several points during the install I did Alt-F2 to bring up a terminal 
to attempt running ifconfig.


"Command not found" was the uniform response.
I booted the new install and attempted as root to run ifconfig.
I again got "Command not found".
That seemed odd.

Having previously done an install using the same ISO and having selected 
the MATE desktop, I repeated the above with the same error.


I have no problem running ifconfig under Squeeze (8.6.0).

Is it "bug" or "operator error"?




The full version reports TX and RX data.


The last line when using the -a option is just what I want.
Thank you.