Enablers, head spaces and physical spaces for issues and more general troubleshooting


#21

If you have issue with something I’ve said in another thread, please address it the specific thread. If this turns into a general thread for you to simply complain about things you don’t agree with me on (which is what it seems you are doing at this point) I’m going to lock it. The last three posts in this thread are from you over the last two weeks and are only you disagreeing with things I’ve said in other threads.


#22

Repeated exaggerations are derailing and counter-constructive. If you lock this topic, it will make other topics more difficult for readers.


#23

Just because you dont agree with something doesn’t it an exaggeration.

No it will keep discussion of threads within those threads, that’s how conversations work. By taking a discussion in another thread and bringing it into this thread when it doesn’t relate to the topic makes this thread more difficult for readers because you are filling it with comments from other threads


#24

This is not about simple differences of opinion.

It is genuinely troublesome when, for example, I try to discuss a particular behaviour, or set of behaviours, and you conflate things as if I’m asking for Windows Vista.

I have tried, repeatedly, to better understand your developer head space but when you make flippant, dismissive remarks such as “No one is stopping you from writing a utility …” – it should be clear that I’m a tester, without coding skills – my patience dwindles.


#25

Graham, you are an intelligent adult. I understand that you do not currently know how to code… but I firmly believe that you are smart enough to figure it out. In the case of dialog that you are requesting… the code has already been written… which you are aware of because you reference it within other applications. In some cases, the feature you have wanted to add (shortcuts) only require copy/pasting one line and changing the key letter from one thing to another.

The comment I made is not flippant and dismissive… it’s actually trying to encourage you. I believe strongly that those that learn to code are the ones that will help build the future. If you ever get a chance, read Program or Be Programmed.

Believe in yourself, you are smart enough to learn to code. Even if you never get to the point where you can create your own OS, or Desktop, etc… you will still have the ability to positively impact the world and help shape users experience.


#26

Dealing With Disrespect is a great guide.


#27

Its obvious these conversations are starting to become counterproductive. Please lets just agree to disagree for now, and move along.


#28

about

Thanks to a hint from @mer (below) at https://github.com/trueos/trueos-utils/network there’s now a fork by me with work in progress towards a pull request.

Example output from a local copy of my edition of about:

$ date 
Sat 28 Jan 2017 13:39:29 GMT
$ pwd
/home/grahamperrin/Documents/BSD/TrueOS/about
$ ./about -v

===================
General information
===================

boot loader ………………………………… BSD
            type …………………… EFI
CPU ……………………………………………………… Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
    number of cores …………… 4
host …………………………………………………… momh167-gjp4-hpelitebook850g2-trueos.university.brighton.ac.uk
memory ……………………………………………… 16384 MB available, 8382 MB free
OS git branch …………………………………………………………………………………… drm-next-4.7
OS git revision ……………………………………………………………………………… f92c24b
OS kernel identity ………………………………………… (uname -i) GENERIC
OS platform (architecture) …………………… (uname -m) amd64
OS release level ……………………………………………… (uname -r) 12.0-CURRENT
OS version and patch level … (freebsd-version) 12.0-CURRENT
TrueOS package set ……………… CUSTOM
TrueOS version ………………………… TrueOS-Desktop-201701060022
uptime ……………………………………………… 6:31
user  ………………………………………………… grahamperrin

More (TrueOS Desktop):

    desktop environment …………… KDE
    Open Sound System (OSS) … pcm1: <Realtek (0x0280) (Analog 2.0+HP/2.0)> (play/rec) default
    wireless driver ……………………… iwm0
    X11 driver …………………………………… modesetting_drv.so 


==========
Networking
==========

Default routing table
---------------------

   route to: default
destination: default
       mask: default
    gateway: 192.168.1.1
        fib: 0
  interface: wlan0
      flags: <UP,GATEWAY,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1500         1         0 

Routing table in numeric format
-------------------------------

Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            192.168.1.1        UGS       wlan0
127.0.0.1          link#2             UH          lo0
192.168.1.0/24     link#3             U         wlan0
192.168.1.7        link#3             UHS         lo0
193.62.168.0/24    link#1             U           em0

Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#2                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%em0/64                     link#1                        U           em0
fe80::5a20:b1ff:fed8:f966%em0     link#1                        UHS         lo0
fe80::%lo0/64                     link#2                        U           lo0
fe80::1%lo0                       link#2                        UHS         lo0
ff02::/16                         ::1                           UGRS        lo0

Interface information, condensed
--------------------------------

ifconfig: unable to get VHT configuration information: Invalid argument
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
        inet6 fe80::5a20:b1ff:fed8:f966%em0 prefixlen 64 scopeid 0x1 
        inet 193.62.168.100 netmask 0xffffff00 broadcast 193.62.168.255 
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo 
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        inet 192.168.1.7 netmask 0xffffff00 broadcast 192.168.1.255 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
        status: associated
        authmode WPA2/802.11i privacy ON deftxkey UNDEF TKIP 2:128-bit
        txpower 0 bmiss 10 scanvalid 60 wme roaming MANUAL
        groups: wlan 

DNS-related
-----------

;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 51037
;; flags: qr rd ra ; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13 
;; QUESTION SECTION:
;; .    IN      NS

;; ANSWER SECTION:
.       78021   IN      NS      c.root-servers.net.
.       78021   IN      NS      k.root-servers.net.
.       78021   IN      NS      i.root-servers.net.
.       78021   IN      NS      j.root-servers.net.
.       78021   IN      NS      f.root-servers.net.
.       78021   IN      NS      m.root-servers.net.
.       78021   IN      NS      g.root-servers.net.
.       78021   IN      NS      l.root-servers.net.
.       78021   IN      NS      a.root-servers.net.
.       78021   IN      NS      d.root-servers.net.
.       78021   IN      NS      e.root-servers.net.
.       78021   IN      NS      h.root-servers.net.
.       78021   IN      NS      b.root-servers.net.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:
a.root-servers.net.     3538018 IN      A       198.41.0.4
a.root-servers.net.     3595841 IN      AAAA    2001:503:ba3e::2:30
b.root-servers.net.     3538018 IN      A       192.228.79.201
b.root-servers.net.     3595841 IN      AAAA    2001:500:84::b
c.root-servers.net.     3538019 IN      A       192.33.4.12
c.root-servers.net.     3595841 IN      AAAA    2001:500:2::c
d.root-servers.net.     3538018 IN      A       199.7.91.13
d.root-servers.net.     3595841 IN      AAAA    2001:500:2d::d
e.root-servers.net.     3538018 IN      A       192.203.230.10
e.root-servers.net.     3595841 IN      AAAA    2001:500:a8::e
f.root-servers.net.     3538018 IN      A       192.5.5.241
f.root-servers.net.     3595841 IN      AAAA    2001:500:2f::f
g.root-servers.net.     3538018 IN      A       192.112.36.4

;; Query time: 2 msec
;; SERVER: 192.168.1.1
;; WHEN: Sat Jan 28 13:39:32 2017
;; MSG SIZE  rcvd: 508

----

IPv4 key points (not interface specific): 

ifconfig: unable to get VHT configuration information: Invalid argument
    193.62.168.100
    127.0.0.1
    192.168.1.7

IPv6 key points (not interface-specific): 

ifconfig: unable to get VHT configuration information: Invalid argument
    fe80::5a20:b1ff:fed8:f966%em0
    ::1
    fe80::1%lo0

   ______                   ____  _____
  /_  __/______  _____     / __ \/ ___/
   / / / ___/ / / / _ \   / / / /\__ \ 
  / / / /  / /_/ /  __/  / /_/ /___/ / 
 /_/ /_/   \__,_/\___/   \____//____/  

                https://www.trueos.org/

$ 

Mentioned in chat a few weeks ago:

  • white spaces allow some things to be more easily selected by double-clicking in a terminal window.

Alphabetical order within each section.

Avoiding initial caps for things that are not real names.

For some of the more mysterious stuff, I show the commands in parentheses. Seeing examples of commands might inspire the end user to consult a manual page; might help people to remember command options; and so on.

There’s an assumption that without the Desktop flavour of TrueOS, Wi-Fi is never used. Is that reasonable?

Results in the networking sections were misleading in some cases. Covered in a separate topic, results of some enhancements are reflected in the edition above.


The 'about' command
#29

Pull requests: probably a bunch of different ways to do it, but here’s what I’ve been doing:
On GitHub, create a fork of the trueos repo you want to work in. The “about” script is in the trueos-utils pkg, you can find this out by doing "pkg which which about"
(pkg command, which is the command to give pkg. the backtick which about backtick saves you from typing /usr/local/bin/about), so you probably want to fork the trueos-utils repo. That gives you a fork up on github. Then on your local machine you clone your forked repo, now you have a copy of your repo on your local harddrive. Then you git checkout -b branchname to create a new branch in your local clone, make changes, git add, git commit to save the changes locally. Then “git push” those changes up to github into your forked repo. After that, if you go to gitbhub in a browser, to your repos, you should see something saying “want to create a pull request”, you click that, it walks you through the steps and you’ve created a pull request for the trueos team.

Oh there a a bunch of good tutorials up on github, so make sure you look at them.


#30

:ballot_box_with_check: thanks

Re: https://www.freebsd.org/cgi/man.cgi?query=uname&sektion=1&manpath=FreeBSD is ident simply an abbreviation for plain English identity?

Or does kernel ident – that two-word phrase (not to be confused with output from option -i) – have a special meaning that disallows use of the word identity?


#31

In FreeBSD land it’s “what kernel config file was used to configure the kernel”. If you do uname -i you should see “GENERIC” unless you are running a customized kernel you built. It typically lives in the freebsd source tree at sys/amd64/conf (if you have a copy of the source tree at /usr/src, it would be /usr/src/sys/amd64/conf/GENERIC).

ident vs identity: probably some old Unix thing that was based on “too many characters to type”. Nothing would disallow the use of the word identity.

ifconfig -l will give you a list of interface name, you could do a for loop and get interface names along with ip address information. The netmask is a bit of information lots of people like to see, you can add a -f to the ifconfig command to change the format of output (try ifconfig -f inet:cidr lo0).
lo0 (or generically loopback interfaces) are pretty much always in use, in fact sysadm-client uses it to tal to sysadm-binary, local delivery sendmail is another use.

if tests in sh: -n “$VAR” is true if $VAR is non zero length (same as != “”) and be careful of spaces around the [ ] things break if you don’t have them.


#32
$ ./about 

===================
General information
===================

boot loader ………………………………… BSD
            type …………………… EFI
CPU ……………………………………………………… Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
    number of cores …………… 4
host …………………………………………………… momh167-gjp4-hpelitebook850g2-trueos.university.brighton.ac.uk
memory ……………………………………………… 16384 MB available, 8408 MB free
OS git branch …………………………………………………………………………………… drm-next-4.7
OS git revision ……………………………………………………………………………… f92c24b
OS kernel identity ………………………………………… (uname -i) GENERIC
OS platform (architecture) …………………… (uname -m) amd64
OS release level ……………………………………………… (uname -r) 12.0-CURRENT
OS version and patch level … (freebsd-version) 12.0-CURRENT
TrueOS package set ……………… CUSTOM
TrueOS version ………………………… TrueOS-Desktop-201701060022
uptime ……………………………………………… 6:37
user  ………………………………………………… grahamperrin

More (TrueOS Desktop):

    desktop environment …………… KDE
    Open Sound System (OSS) … pcm1: <Realtek (0x0280) (Analog 2.0+HP/2.0)> (play/rec) default
    wireless driver ……………………… iwm0
    X11 driver …………………………………… modesetting_drv.so 

   ______                   ____  _____
  /_  __/______  _____     / __ \/ ___/
   / / / ___/ / / / _ \   / / / /\__ \ 
  / / / /  / /_/ /  __/  / /_/ /___/ / 
 /_/ /_/   \__,_/\___/   \____//____/  

                https://www.trueos.org/

$ 

Scroll down to reveal the artwork; https://github.com/grahamperrin/trueos-utils/commit/c221cfe625f80bbfdab37d2bc4c9e87d93a568ce for the rationale. That commit also attends to comment lines, one or two of which may have been misplaced in the version from which I forked.


#33

Looks good. I would remove the logo, and everything below. Its not really needed in an about tool.


#34

Would it be helpful to add an option to dump loaded modules? basically the output of kldstat?

If the bootloader is set to BIOS, the if that is testing EFICHECK = efifb throws an error because $EFICHECK is an empty string. Since EFICHECK already has a grep (efifb) in it, simply changing the test to if [ -n “$EFICHECK” ] ; then works to detect EFI or BIOS.


#35

… and more; some time next week I’ll edit the flags/options, to allow reuse of code plus reasonable consistency with other commands, including future developments.

A few months ago, probably not in this forum, I discussed having something like sysdiagnose(1) for TrueOS. Re: http://apple.stackexchange.com/a/87982/8546 I suspect that Apple’s change from a plain text script, to binary, related more to reliability (in AppleSeed projects I made bug reports for sysdiagnose itself) than to obscurity. I’ll make enquires.

Writing lazily from a mobile phone (not suitable for sanity checking) I imagine a future set to be something like:

  • -a all (not to be confused with verbose)
  • -c compatibility
  • -g general (the default, if no option is specified)
  • -h hardware
  • -i interactive
  • -k kernel
  • -n networking
  • -r runlevels
  • -u updating
  • -v verbose

#36

Seeing OSS at https://github.com/trueos/trueos-utils/blob/94bde467073ff67998392393a8bd5d2bec100063/src-sh/trueos-utils/about/about#L99 led me to believe that Open Sound System (oss) is integral to TrueOS Desktop. Not so:

$ pkg info oss
pkg-static: No package(s) matching oss
$ date ; uname -v
Thu  2 Feb 2017 05:49:48 GMT
FreeBSD 12.0-CURRENT #14 f92c24b(drm-next-4.7): Fri Jan  6 19:28:21 UTC 2017     root@gauntlet:/usr/obj/usr/src/sys/GENERIC 
$ 

A context for cat /dev/sndstat without reference to OSS appears at https://www.freebsd.org/doc/handbook/sound-setup.html, I’ll change the script accordingly.


#37

@mer I might get to some of that stuff at or after the weekend.

Graphics-related https://github.com/trueos/trueos-core/issues/316 arose whilst testing but it need not stop a PR, when the time comes.

Luke, please: what other types of information would you treat as sensitive? Consider outputs from:

  • about -n
  • ifconfig

(There’s work in progress to enhance the about command.)


#38

Well, my personal comfort with information is relative to it’s permanence/searchability. I would never post the results of :

about -n

or

ifconfig

here because any information that might help someone/somebot hack into my machine put permanently somewhere is a no-go (though to be fair I suppose the hostname doesn’t help), but I’m willing to post such things in gitter through a pastebin exactly because someone searching for such information will have it get lost in the noise.

Actually just throwing this out there… I’d like a system where I can log in post details like that, and only members of the gitter/forum whatever (if the forum above a certain post level) can view it, and then those pastes can be self-destructed when the issue is marked as solved.


#39

you can always edit out the “personal” info


#40

Correct, but he was asking about what I would consider to be sensitive. Which for me I consider to be the set of things that could be used to helping hack into my devices if scraped. So IP addresses, MAC addresses, usernames, other machine identifiable information. Whereas say what my hardware is or how some set of config files is written doesn’t really matter (with some exceptions). My comfort revealing things in the former category is directly a function of the accessibility of the information, it’s “permanence”, and how well someone can just search for it.

Limiting the set of people who can access it, and allowing for destructibility would make me much more comfortable to post things in an environment such as this which is highly searchable. Gitter by contrast has marginal limitation on the set of people who can access it, but it’s not easily searchable and thus is more comfortable.

Basically it’s less that

needs to change and more that Information Security needs to be improved for me to feel comfortable.


Pros and cons of Gitter