This commit is contained in:
kyodev 2017-08-19 03:45:31 +02:00
parent 597ff2143b
commit aad2c20e80
3 changed files with 294 additions and 256 deletions

View File

@ -1,13 +1,13 @@
# getInfo 1.0.0 sur 1101HA / Linux
# getInfo 1.0.7 sur 1101HA / Linux
Rapport au 17 août 2017 10:20 +0200
Rapport au 19 août 2017 03:37 +0200
## système
**CPU: Intel Atom Z520 (1)(2) @ 0.8 - 1.3 GHz [55.0°C]**
**GPU: Intel Corporation System Controller Hub (SCH Poulsbo) Graphics Controller**
**type de boot: Legacy boot**
**Debian GNU/Linux 9 (stretch) 9.1**
CPU: **Intel Atom Z520 (1)(2) @ 0.8 - 1.3 GHz [51.0°C]**
GPU: **Intel Corporation System Controller Hub (SCH Poulsbo) Graphics Controller**
type de boot: **Legacy boot**
distribution: **Debian GNU/Linux 9 (stretch) 9.1**
```
architecture: 32bits, i686
@ -21,35 +21,36 @@ shell actif: bash 4.4.12(1)
shells installés: sh dash bash rbash
disque(s): 9,1G / 43G (22%)
batteries(s): 100% [Full]
dernier boot: 2017-08-15 11:53:49+0200, uptime: depuis 1 jour, 22 h, 26 mn
192.168.1.129 pour wlp1s0 (wifi)
dernier boot: 2017-08-18 06:59:58+0200, uptime: depuis 20 h, 37 mn
```
## processeur / mémoire
```
CPU: Intel Atom Z520 (1)(2) @ 0.8 - 1.3 GHz [55.0°C]
CPU: Intel Atom Z520 (1)(2) @ 0.8 - 1.3 GHz [51.0°C]
adressage: 32 bits physical, 32 bits virtual
bogomips: 2662.55
bogomips: 2662.52
mémoire Ram utilisée/totale: 547Mo / 994Mo
mémoire Ram utilisée/totale: 580Mo / 995Mo
mémoire système: total used free shared buff/cache available
Mem: 994M 475M 121M 72M 398M 303M
Swap: 3,7G 87M 3,6G
Total: 4,7G 562M 3,8G
Mem: 995M 508M 98M 72M 388M 269M
Swap: 3,7G 57M 3,7G
Total: 4,7G 565M 3,8G
```
flags cpu:
```
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts aperfmperf eagerfpu pni dtes64 monitor ds_cpl vmx est tm2 ssse3 xtpr pdcm movbe lahf_lm tpr_shadow vnmi flexpriority dtherm
```
## graphisme
**GPU: Intel Corporation System Controller Hub (SCH Poulsbo) Graphics Controller**
**résolution: 1366x768 @ 60Hz**
**lspci -nnvvv | grep -iEA 13 '^[0-9]+.*vga|display|3d'** (matériel)
```
00:02.0 VGA compatible controller [0300]: Intel Corporation System Controller Hub (SCH Poulsbo) Graphics Controller [8086:8108] (rev 07) (prog-if 00 [VGA controller])
@ -72,6 +73,7 @@ fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts ac
```
OpenGL version string: 3.0 Mesa 13.0.6
```
**xrandr --query | grep '^ *[0-9]' | head -n 10** (10 premières résolutions possibles)
```
1366x768 60.02*+
@ -85,18 +87,19 @@ OpenGL version string: 3.0 Mesa 13.0.6
800x600 60.00 60.32 56.25
840x525 60.01 59.88
```
**grep -E '\(WW\)|\(EE\)|\(NI\)|\(\?\?\)' /var/log/Xorg.*.log /home/user/.local/share/xorg/Xorg.*.log** (extrait xorg.log)
```
/var/log/Xorg.0.log: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
/var/log/Xorg.0.log:[ 21.977] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
/var/log/Xorg.0.log:[ 22.614] (WW) Warning, couldn't open module psb
/var/log/Xorg.0.log:[ 22.615] (EE) Failed to load module "psb" (module does not exist, 0)
/var/log/Xorg.0.log:[ 22.621] (WW) Warning, couldn't open module psbdrv
/var/log/Xorg.0.log:[ 22.622] (EE) Failed to load module "psbdrv" (module does not exist, 0)
/var/log/Xorg.0.log:[ 22.716] (WW) Falling back to old probe method for fbdev
/var/log/Xorg.0.log:[ 22.725] (WW) Falling back to old probe method for vesa
/var/log/Xorg.0.log:[ 24.511] (EE) modeset(0): glamor initialization failed
/var/log/Xorg.0.log:[ 24.915] (EE) AIGLX: reverting to software rendering
/var/log/Xorg.0.log:[ 25.063] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
/var/log/Xorg.0.log:[ 25.373] (WW) Warning, couldn't open module psb
/var/log/Xorg.0.log:[ 25.373] (EE) Failed to load module "psb" (module does not exist, 0)
/var/log/Xorg.0.log:[ 25.374] (WW) Warning, couldn't open module psbdrv
/var/log/Xorg.0.log:[ 25.374] (EE) Failed to load module "psbdrv" (module does not exist, 0)
/var/log/Xorg.0.log:[ 25.596] (WW) Falling back to old probe method for fbdev
/var/log/Xorg.0.log:[ 25.610] (WW) Falling back to old probe method for vesa
/var/log/Xorg.0.log:[ 27.538] (EE) modeset(0): glamor initialization failed
/var/log/Xorg.0.log:[ 27.890] (EE) AIGLX: reverting to software rendering
/var/log/Xorg.1.log: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
/var/log/Xorg.1.log:[126490.922] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
/var/log/Xorg.1.log:[126491.821] (WW) Warning, couldn't open module psb
@ -109,6 +112,7 @@ OpenGL version string: 3.0 Mesa 13.0.6
/var/log/Xorg.1.log:[126497.921] (EE) AIGLX: reverting to software rendering
```
### modules video
liste non garantie complète
@ -123,22 +127,25 @@ videodev 131072 3 uvcvideo,videobuf2_core,videobuf2_v4l2
media 28672 2 uvcvideo,videodev
gma500_gfx 163840 2
drm_kms_helper 114688 1 gma500_gfx
video 36864 2 eeepc_laptop,gma500_gfx
drm 253952 4 gma500_gfx,drm_kms_helper
i2c_algo_bit 16384 1 gma500_gfx
video 36864 2 eeepc_laptop,gma500_gfx
usbcore 184320 6 uvcvideo,usbhid,ehci_hcd,uhci_hcd,btusb,ehci_pci
```
## localisation
**grep -vE '#|^$' /etc/default/locale**
```
LANG=fr_FR.UTF-8
```
**cat /etc/timezone**
```
Europe/Paris
```
**setxkbmap -query**
```
rules: evdev
@ -147,6 +154,7 @@ layout: fr,fr
variant: oss,
options: terminate:ctrl_alt_bksp
```
**grep -vE '#|^$' /etc/default/keyboard**
```
XKBMODEL="pc105"
@ -156,21 +164,25 @@ XKBOPTIONS="terminate:ctrl_alt_bksp"
BACKSPACE="guess"
```
## sources list
**grep -rvE '^#|^$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list 2>/dev/null**
```
/etc/apt/sources.list: deb http://deb.debian.org/debian/ stretch main contrib non-free
/etc/apt/sources.list: deb http://deb.debian.org/debian-security stretch/updates main contrib non-free
/etc/apt/sources.list: deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
```
dernière mise à jour **apt**: mercredi 16 août 2017, 18:59:07 (UTC+0200)
**5 paquet(s) installé(s) inutile(s)**, vous pouvez utiliser: apt autoremove. paquet(s) concerné(s):
dernière mise à jour **apt**: vendredi 18 août 2017, 12:15:26 (UTC+0200)
**5 paquet(s) installé(s) inutile(s)**, vous pouvez utiliser: `apt autoremove`
paquet(s) concerné(s):
```
gir1.2-packagekitglib-1.0 packagekit-tools packagekit libpackagekit-glib2-18 python3-dbus [1.2.4-1+b1]
```
**des paquets devraient être mis à jour:**
**apt list --upgradable**
**des paquets devraient être mis à jour.** `apt list --upgradable`
```
git/stable 1:2.11.0-3+deb9u1 i386 [upgradable from: 1:2.11.0-3]
git-man/stable 1:2.11.0-3+deb9u1 all [upgradable from: 1:2.11.0-3]
@ -185,12 +197,15 @@ linux-image-4.9.0-3-686-pae/stable 4.9.30-2+deb9u3 i386 [upgradable from: 4.9.30
linux-kbuild-4.9/stable 4.9.30-2+deb9u3 i386 [upgradable from: 4.9.30-2+deb9u2]
linux-libc-dev/stable 4.9.30-2+deb9u3 i386 [upgradable from: 4.9.30-2+deb9u2]
```
il y a des **paquet(s) dans un état non installé**. ce n'est pas forcément grave, mais ça peut être examiné. paquet(s) concerné(s):
il y a des **paquet(s) dans un état non installé**. ce n'est pas forcément grave, mais ça peut être examiné.
paquet(s) concerné(s):
```
rc pavucontrol 3.0-3.1
rc rtkit 0.11-4+b1
```
## disque(s)
disque(s): 9,1G / 43G (22%)
@ -201,6 +216,7 @@ UUID=c7a795ce-71d8-4d01-b589-281593434b7f / ext4 errors=remount
UUID=426c6d02-3471-4158-b6f3-f1348c8c2d54 /home ext4 defaults 0 2
/dev/sda6 none swap sw 0 0
```
**lsblk -fi -o +SIZE -o +OWNER** (disques)
```
NAME FSTYPE LABEL UUID MOUNTPOINT OWNER
@ -211,12 +227,14 @@ sda root
|-sda5 ext4 home 426c6d02-3471-4158-b6f3-f1348c8c2d54 /home root
`-sda6 swap 3264f09c-87ed-4731-8132-3e929d120c65 [SWAP] root
```
**df -h ...** (utilisation disques)
```
Sys. de fichiers Monté sur Type Taille Utilisé Dispo Uti%
/dev/sda1 / ext4 14G 4,7G 8,4G 36%
/dev/sda5 /home ext4 28G 4,4G 24G 16%
```
**grep -Ev '#|^$' /etc/initramfs-tools/conf.d/resume** (resume)
```
RESUME=auto
@ -233,14 +251,17 @@ RESUME=auto
**IP locale(s):**
```
192.168.1.129 pour wlp1s0 (wifi)
192.168.1.129/24 ( wlp1s0 ) (wifi)
fe80::96a8:dcbc:b798:370/64 ( wlp1s0 ) (wifi)
```
**Passerelle(s):**
```
192.168.1.5 pour wlp1s0
192.168.1.5 ( wlp1s0 ) (wifi)
fe80::160c:76ff:fe54:7490 ( wlp1s0 ) (wifi)
```
l'IP publique n'apparaît pas pour ne pas être publiée, mais elle peut être connue avec:
`./getInfo --ip ou getInfo --ip (script installé)`
l'IP publique peut être connue avec: `./getInfo --ip` ou `getInfo --ip` (script installé)
**lspci -nnk | grep -iEA 3 'network|ethernet'**
```
@ -253,25 +274,19 @@ l'IP publique n'apparaît pas pour ne pas être publiée, mais elle peut être c
Kernel driver in use: atl1c
Kernel modules: atl1c
```
**ip address show**
**ip address** (ipv6 lien local, pas d'adresses MAC)
```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 00:26:18:69:ec:c2 brd ff:ff:ff:ff:ff:ff
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:25:d3:43:de:42 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.129/24 brd 192.168.1.255 scope global dynamic wlp1s0
valid_lft 29950sec preferred_lft 29950sec
inet6 2a01:e35:8bf2:37b0:f9ef:6cdb:f8a9:d419/64 scope global noprefixroute dynamic
valid_lft 86359sec preferred_lft 86359sec
inet6 fe80::96a8:dcbc:b798:370/64 scope link
valid_lft forever preferred_lft forever
inet6 fe80::96a8:dcbc:b798:370/64 scope link
```
**iwconfig**
```
wlp1s0 IEEE 802.11 ESSID:"freemfi"
@ -280,49 +295,34 @@ wlp1s0 IEEE 802.11 ESSID:"freemfi"
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=67/70 Signal level=-43 dBm
Link Quality=70/70 Signal level=-32 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:86 Missed beacon:0
Tx excessive retries:0 Invalid misc:127 Missed beacon:0
```
**/etc/network/interfaces**
```
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
```
**ip route show**
```
default via 192.168.1.5 dev wlp1s0 proto static metric 600
169.254.0.0/16 dev wlp1s0 scope link metric 1000
192.168.1.0/24 dev wlp1s0 proto kernel scope link src 192.168.1.129 metric 600
```
**/etc/resolv.conf**
```
nameserver 2a01:e00::1
nameserver 2a01:e00::2
nameserver 37.187.16.17
nameserver 52.174.55.168
nameserver 80.67.169.12
nameserver 80.67.169.40
nameserver 2a01:e00::1
nameserver 2a01:e00::2
nameserver 80.67.169.40
```
### network managers
installé(s): **NetworkManager**
en fonctionnement: **/usr/sbin/NetworkManager --no-daemon**
### modules réseau
liste non garantie complète
```
ath9k 90112 0
ath9k_common 32768 1 ath9k
ath9k_hw 413696 2 ath9k,ath9k_common
ath 24576 3 ath9k_hw,ath9k,ath9k_common
mac80211 548864 1 ath9k
cfg80211 450560 4 mac80211,ath9k,ath,ath9k_common
wmi 16384 0
rfkill 20480 6 eeepc_laptop,bluetooth,cfg80211
```
**iwlist chan**
```
wlp1s0 14 channels in total; available frequencies :
@ -343,6 +343,26 @@ wlp1s0 14 channels in total; available frequencies :
Current Frequency:2.452 GHz (Channel 9)
```
### network managers
installé(s): **NetworkManager**
en fonctionnement: **/usr/sbin/NetworkManager --no-daemon**
### modules réseau
liste non garantie complète
```
ath9k 90112 0
ath9k_common 32768 1 ath9k
ath9k_hw 413696 2 ath9k,ath9k_common
ath 24576 3 ath9k_hw,ath9k,ath9k_common
mac80211 548864 1 ath9k
cfg80211 450560 4 mac80211,ath9k,ath,ath9k_common
rfkill 20480 6 eeepc_laptop,bluetooth,cfg80211
wmi 16384 0
```
## Network Manager
**grep -vE '#|^$' /var/lib/NetworkManager/NetworkManager.state**
@ -352,6 +372,7 @@ NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
```
**grep -vE '#|^$' /etc/NetworkManager/NetworkManager.conf**
```
[main]
@ -360,114 +381,122 @@ plugins=ifupdown,keyfile
managed=false
```
## wifis à proximité
**nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY device wifi list**
```
SSID BSSID MODE CHAN FRÉQ DÉBIT SIGNAL BARS SÉCURITÉ
FreeWifi 14:0C:76:54:74:92 Infra 9 2452 MHz 54 Mo/s 94 ▂▄▆█ --
FreeWifi_secure 14:0C:76:54:74:93 Infra 9 2452 MHz 54 Mo/s 94 ▂▄▆█ WPA2 802.1X
freemfi 14:0C:76:54:74:91 Infra 9 2452 MHz 54 Mo/s 79 ▂▄▆_ WPA2
KLAC2Free F4:CA:E5:D2:6E:74 Infra 11 2462 MHz 54 Mo/s 45 ▂▄__ WPA2
Bbox-10913089 E8:BE:81:B1:FE:B0 Infra 1 2412 MHz 54 Mo/s 42 ▂▄__ WPA1 WPA2
FreeWifi_secure F4:CA:E5:D2:6E:76 Infra 11 2462 MHz 54 Mo/s 37 ▂▄__ WPA2 802.1X
FreeWifi F4:CA:E5:D2:6E:75 Infra 11 2462 MHz 54 Mo/s 32 ▂▄__ --
FreeWifi 14:0C:76:54:74:92 Infra 9 2452 MHz 54 Mo/s 100 ▂▄▆█ --
FreeWifi_secure 14:0C:76:54:74:93 Infra 9 2452 MHz 54 Mo/s 100 ▂▄▆█ WPA2 802.1X
freemfi 14:0C:76:54:74:91 Infra 9 2452 MHz 54 Mo/s 86 ▂▄▆█ WPA2
KLAC2Free F4:CA:E5:D2:6E:74 Infra 11 2462 MHz 54 Mo/s 47 ▂▄__ WPA2
FreeWifi_secure F4:CA:E5:D2:6E:76 Infra 11 2462 MHz 54 Mo/s 40 ▂▄__ WPA2 802.1X
FreeWifi F4:CA:E5:D2:6E:75 Infra 11 2462 MHz 54 Mo/s 39 ▂▄__ --
FreeWifi E4:9E:12:0D:95:EB Infra 11 2462 MHz 54 Mo/s 30 ▂___ --
FreeWifi_secure 14:0C:76:F5:95:CA Infra 3 2422 MHz 54 Mo/s 29 ▂___ WPA2 802.1X
Freebox-62E169 14:0C:76:F5:95:C8 Infra 3 2422 MHz 54 Mo/s 27 ▂___ WPA1
FreeWifi 14:0C:76:F5:95:C9 Infra 3 2422 MHz 54 Mo/s 27 ▂___ --
Freebox-62E169 14:0C:76:F5:95:C8 Infra 3 2422 MHz 54 Mo/s 25 ▂___ WPA1
FreeWifi 7A:13:8E:BD:A0:B6 Infra 7 2442 MHz 54 Mo/s 24 ▂___ --
FreeWifi_secure 7A:13:8E:BD:A0:B7 Infra 7 2442 MHz 54 Mo/s 22 ▂___ WPA1 802.1X
FreeWifi F4:CA:E5:B0:DE:C1 Infra 11 2462 MHz 54 Mo/s 22 ▂___ --
Livebox-334E B4:A5:EF:D3:33:4C Infra 6 2437 MHz 54 Mo/s 20 ▂___ WPA2
-- 7A:13:8E:BD:A0:B5 Infra 7 2442 MHz 54 Mo/s 20 ▂___ WPA2
SFR WiFi FON 7A:95:04:06:F0:E5 Infra 11 2462 MHz 54 Mo/s 20 ▂___ --
GilBENETT BA:95:9A:05:36:E8 Infra 12 2467 MHz 54 Mo/s 20 ▂___ WEP
freebox_guillot 7A:13:8E:BD:A0:B4 Infra 7 2442 MHz 54 Mo/s 19 ▂___ WEP
Bbox-1836349E 64:7C:34:C6:C7:9C Infra 1 2412 MHz 54 Mo/s 17 ▂___ WPA1 WPA2
FreeWifi_secure 14:0C:76:F5:95:CA Infra 3 2422 MHz 54 Mo/s 17 ▂___ WPA2 802.1X
freebox_JACKY 68:A3:78:1D:F9:1C Infra 11 2462 MHz 54 Mo/s 17 ▂___ WPA1
FreeWifi 68:A3:78:0F:25:0A Infra 12 2467 MHz 54 Mo/s 17 ▂___ --
FreeWifi 06:7F:8F:C1:CF:82 Infra 3 2422 MHz 54 Mo/s 15 ▂___ --
-- 06:7F:8F:C1:CF:81 Infra 3 2422 MHz 54 Mo/s 15 ▂___ WPA2
FreeWifi_secure 06:7F:8F:C1:CF:83 Infra 3 2422 MHz 54 Mo/s 12 ▂___ WPA1 802.1X
orange 48:83:C7:25:0E:81 Infra 6 2437 MHz 54 Mo/s 12 ▂___ --
Livebox-CD70 48:83:C7:25:0E:80 Infra 6 2437 MHz 54 Mo/s 12 ▂___ WPA2
FreeWifi_secure F4:CA:E5:B0:DE:C2 Infra 11 2462 MHz 54 Mo/s 12 ▂___ WPA2 802.1X
FREEBOX_HABIB_2C 06:7F:8F:C1:CF:80 Infra 3 2422 MHz 54 Mo/s 10 ▂___ WPA1
FreeWifi_secure 14:0C:76:AF:F2:0C Infra 11 2462 MHz 54 Mo/s 27 ▂___ WPA2 802.1X
freebox_nono 14:0C:76:AF:F2:0A Infra 11 2462 MHz 54 Mo/s 27 ▂___ WEP
Livebox-EFD2 B8:26:6C:34:EF:D2 Infra 1 2412 MHz 54 Mo/s 25 ▂___ WPA1 WPA2
orange 1E:03:D8:6E:E5:02 Infra 1 2412 MHz 54 Mo/s 25 ▂___ --
FreeWifi 14:0C:76:AF:F2:0B Infra 11 2462 MHz 54 Mo/s 25 ▂___ --
Bbox-10913089 E8:BE:81:B1:FE:B0 Infra 1 2412 MHz 54 Mo/s 24 ▂___ WPA1 WPA2
FREEBOX_HABIB_2C 68:A3:78:8D:1D:D4 Infra 3 2422 MHz 54 Mo/s 24 ▂___ WPA1
FreeWifi_secure 68:A3:78:8D:1D:D6 Infra 3 2422 MHz 54 Mo/s 24 ▂___ WPA2 802.1X
FreeWifi_secure F4:CA:E5:88:4A:62 Infra 8 2447 MHz 54 Mo/s 24 ▂___ WPA2 802.1X
FreeWifi 14:0C:76:E5:77:59 Infra 11 2462 MHz 54 Mo/s 24 ▂___ --
SFR-91d0 40:65:A3:08:91:D6 Infra 1 2412 MHz 54 Mo/s 20 ▂___ WPA1 WPA2
FreeWifi F4:CA:E5:C3:90:6D Infra 3 2422 MHz 54 Mo/s 17 ▂___ --
freebox_UVPNFM B6:CA:05:6E:3A:BC Infra 3 2422 MHz 54 Mo/s 15 ▂___ WPA1
Bbox-DF4B4024 E8:F1:B0:D6:3F:60 Infra 6 2437 MHz 54 Mo/s 15 ▂___ WPA1 WPA2
Livebox-334E B4:A5:EF:D3:33:4C Infra 6 2437 MHz 54 Mo/s 15 ▂___ WPA2
FreeWifi_secure 68:A3:78:0F:25:0B Infra 12 2467 MHz 54 Mo/s 10 ▂___ WPA2 802.1X
mrowifi 68:A3:78:0F:25:09 Infra 12 2467 MHz 54 Mo/s 10 ▂___ WPA1
FreeWifi BA:95:9A:05:36:EA Infra 12 2467 MHz 54 Mo/s 9 ▂___ --
FreeWifi_secure F4:CA:E5:BE:CF:9E Infra 1 2412 MHz 54 Mo/s 7 ▂___ WPA2 802.1X
```
## périphériques USB
**lsusb**
```
Bus 003 Device 004: ID 13d3:5071 IMC Networks
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 0b05:b700 ASUSTek Computer, Inc. Broadcom Bluetooth 2.1
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 004: ID 13d3:5071 IMC Networks
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0b05:b700 ASUSTek Computer, Inc. Broadcom Bluetooth 2.1
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
```
**lsusb -t**
```
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 2: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 2: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
|__ Port 2: Dev 3, If 2, Class=Vendor Specific Class, Driver=, 12M
|__ Port 2: Dev 3, If 3, Class=Application Specific Interface, Driver=, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M
|__ Port 7: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 7: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 2: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 2: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
|__ Port 2: Dev 2, If 2, Class=Vendor Specific Class, Driver=, 12M
|__ Port 2: Dev 2, If 3, Class=Application Specific Interface, Driver=, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
```
## analyse boot
durée de boot: 4.797s (kernel) + 25.807s (espace utilisateur) = 30.605s
**durée de boot:** 5.735s (kernel) + 30.430s (espace utilisateur) = **36.166s**
**systemd-analyze blame | head -n 20**
```
6.575s NetworkManager-wait-online.service
5.844s loadcpufreq.service
5.175s dev-sda1.device
4.500s accounts-daemon.service
4.015s upower.service
3.917s networking.service
3.534s exim4.service
3.421s systemd-logind.service
3.348s apt-daily-upgrade.service
2.984s rsyslog.service
2.887s NetworkManager.service
2.783s avahi-daemon.service
2.772s bluetooth.service
2.710s ModemManager.service
2.246s apt-daily.service
1.466s systemd-fsck@dev-disk-by-uuid-426c6d02-3471-4158-b6f3-f1348c8c2d54.service
1.195s keyboard-setup.service
855ms systemd-tmpfiles-setup-dev.service
762ms polkit.service
706ms udisks2.service
6.352s NetworkManager-wait-online.service
6.166s dev-sda1.device
6.082s apt-daily-upgrade.service
5.502s loadcpufreq.service
5.316s ModemManager.service
4.827s apt-daily.service
4.388s exim4.service
4.276s accounts-daemon.service
3.983s networking.service
3.571s upower.service
3.195s systemd-fsck@dev-disk-by-uuid-426c6d02-3471-4158-b6f3-f1348c8c2d54.service
2.942s NetworkManager.service
2.809s pppd-dns.service
2.775s systemd-rfkill.service
2.501s systemd-logind.service
2.448s alsa-restore.service
2.434s lm-sensors.service
2.432s rsyslog.service
2.340s bluetooth.service
1.604s polkit.service
```
## dmesg (erreur, warning ou critique)
**dmesg -l err** (erreur)
```
[ 10.780816] gma500 0000:00:02.0: trying to get vblank count for disabled pipe 0
[ 10.780912] gma500 0000:00:02.0: trying to get vblank count for disabled pipe 0
```
**dmesg -l warn** (warning)
```
[ 0.398049] pci 0000:03:00.0: [Firmware Bug]: disabling VPD access (can't determine size of non-standard VPD format)
[ 6.769087] systemd[1]: rtkit-daemon.service: Cannot add dependency job, ignoring: Unit rtkit-daemon.service is masked.
[ 9.587065] pmd_set_huge: Cannot satisfy [mem 0x3f800000-0x3fa00000] with a huge-page mapping due to MTRR override.
[ 11.234804] uvcvideo 3-7:1.0: Entity type for entity Extension 2 was not initialized!
[ 11.234821] uvcvideo 3-7:1.0: Entity type for entity Processing 3 was not initialized!
[ 11.234833] uvcvideo 3-7:1.0: Entity type for entity Camera 1 was not initialized!
[ 12.549690] gma500 0000:00:02.0: trying to get vblank count for disabled pipe 0
[ 12.549774] gma500 0000:00:02.0: trying to get vblank count for disabled pipe 0
[ 17.764167] snd_hda_intel 0000:00:1b.0: azx_get_response timeout, switching to single_cmd mode: last cmd=0x015ba000
```
_[rapport getInfo v1.0.0b1](https://kyodev.frama.io/kyopages/scripts/getInfo/)
**dmesg -l warn** (warning)
```
[ 0.390069] pci 0000:03:00.0: [Firmware Bug]: disabling VPD access (can't determine size of non-standard VPD format)
[ 7.717960] systemd[1]: rtkit-daemon.service: Cannot add dependency job, ignoring: Unit rtkit-daemon.service is masked.
[ 10.856343] pmd_set_huge: Cannot satisfy [mem 0x3f800000-0x3fa00000] with a huge-page mapping due to MTRR override.
[ 12.079187] uvcvideo 4-7:1.0: Entity type for entity Extension 2 was not initialized!
[ 12.079207] uvcvideo 4-7:1.0: Entity type for entity Processing 3 was not initialized!
[ 12.079220] uvcvideo 4-7:1.0: Entity type for entity Camera 1 was not initialized!
[ 13.052373] to colour frame buffer device 170x48
[ 16.756173] snd_hda_intel 0000:00:1b.0: azx_get_response timeout, switching to polling mode: last cmd=0x015ba000
```
[rapport getInfo v1.0.7](https://kyodev.frama.io/kyopages/scripts/getInfo/)

View File

@ -1,7 +1,7 @@
#!/bin/bash
version=1.0.6
date="18/08/2017"
version=1.0.7
date="19/08/2017"
projet="simpledeb"
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues"
script="getInfo"
@ -586,40 +586,12 @@ get_wm() { # thanks neofetch, assigne $wm
fi
}
paste_curl_pastery(){ # $1 fichier à exporter, $2 durée de conservation en jour; $3 debug
[ -e "$1" ] || f__error "fichier $1 inexistant"
# curl -X POST "https://www.pastery.net/api/paste/?title=getInfo&language=markdown" -F file=@$1
local curl="$(curl --silent -X POST "https://www.pastery.net/api/paste/?title=getInfo_$version&language=markdown&duration=$(($2*1440))" --data-binary @$1)"
local id="$(echo $curl | cut -d '"' -f 4)"
f__info "\n\n votre paste:" "https://www.pastery.net/$id/"
[ "$3" == "debug" ] && echo -e "\n$curl\n"
# ?api_key=<api_key>
# &duration=<duration> en mn, 1 jour par défaut
# &language=autodetect possible
# &max_views=<max_views>
# 100ko max
}
paste_curl_markdownshare(){
[ -e "$1" ] || f__error "fichier $1 inexistant"
curl -H "Accept: application/json" -X POST -F "text=<$1" https://markdownshare.com/create/
#-A, --user-agent and -e, --referer options
#If you wish to allow a post to expire then add an expire= parameter too:
#expire=Nh Expire in N hours.
#expire=Nd Expire in N days.
#-d expire ? ou --data expire
}
fi_cpu(){
local cpu_addr="$(sed -n 's/^address sizes.*: \(.*\)$/\1/p' /proc/cpuinfo | head -n 1)"
local cpu_bogomips="$(sed -n 's/^bogomips.*: \(.*\)$/\1/p' /proc/cpuinfo | head -n 1)"
local cpu_flags="$(sed -n 's/^flags.*: \(.*\)$/\1/p;' /proc/cpuinfo | head -n 1)"
local memsys="$(free -ht)"
###
local text="## processeur / mémoire \n\n"
text+='```\n'
get_cpu; text+="CPU: $cpu \n"
@ -627,11 +599,11 @@ fi_cpu(){
text+="bogomips: $cpu_bogomips \n"
get_memory; text+="\nmémoire Ram utilisée/totale: $memory \n\n"
text+="mémoire système: $memsys \n"
text+='```\n'
text+='```\n\n'
text+="flags cpu: \n"
text+='```\n'
text+="$cpu_flags \n"
text+='```\n'
text+='```\n\n'
echo -e "$text" >> "$fileOutput"
}
@ -646,28 +618,29 @@ fi_disk(){
local diskUsb="$(ls -l /dev/disk/by-id/ | awk '{ print $9, $11 }' | sed '/^usb/!d; /part/d; /\/sd/!d; s/^.*\(sd..*\)$/\1/')"
local diskMmc="$(ls -l /dev/disk/by-id/ | awk '{ print $9, $11 }' | sed '/^mmc/!d; /part/d; /\/mmcblk/!d; s/^.*\(mmcblk..*\)$/\1/')"
local diskNvme="$(ls -l /dev/disk/by-id/ | awk '{ print $9, $11 }' | sed '/^nvme/!d; /part/d; /\/nvme/!d; s/^.*\(nvme...*\)$/\1/')"
###
local text="## disque(s) \n\n"
get_disk; text+="disque(s): $disk \n\n"
text+="**grep -vE '#|^$' /etc/fstab** (fstab) \n"
text+='```\n'
text+="$fstab \n"
text+='```\n'
text+='```\n\n'
text+="**lsblk -fi -o +SIZE -o +OWNER** (disques) \n"
text+='```\n'
text+="$disk_lsblk \n"
text+='```\n'
text+='```\n\n'
text+="**df -h ...** (utilisation disques) \n"
text+='```\n'
text+="$utilDisk \n"
text+='```\n'
text+='```\n\n'
text+="**grep -Ev '#|^$' /etc/initramfs-tools/conf.d/resume** (resume) \n"
text+='```\n'
text+="$resume \n"
text+='```\n'
[ "$idSwap" ] && [ "$idResume" ] && [ "$idSwap"!="$idResume" ] && text+="_vérifier la config resume_, l'UUID ne semble pas correspondre à celui du swap. en cas de multi-boot, vous pouvez utiliser _RESUME=auto_ ou _RESUME=/dev/sdx_ \n"
text+="\n**types de disque** \n\n"
text+='```\n\n'
if [ "$idSwap" ] && [ "$idResume" ] && [ "$idSwap"!="$idResume" ]; then
text+="_vérifier la config resume_, l'UUID ne semble pas correspondre à celui du swap. en cas de multi-boot, vous pouvez utiliser _RESUME=auto_ ou _RESUME=/dev/sdx_ \n\n"
fi
text+="**types de disque** \n\n"
[ "$diskAta" ] || diskAta="-"; text+="* ata: $diskAta \n"
[ "$diskUsb" ] || diskUsb="-"; text+="* usb: $diskUsb \n"
[ "$diskMmc" ] || diskMmc="-"; text+="* mmc: $diskMmc \n"
@ -686,33 +659,35 @@ fi_dmesg(){ # root only, si $1=dmesg rapport dmesg only
echo -e "$text" >> "$fileOutput"
return 0
fi
###
local dmesg_err="$(dmesg -l err)"
local dmesg_warn="$(dmesg -l warn)"
local dmesg_crit="$(dmesg -l crit)"
if [ "$dmesg_warn" ]; then
if [ "$dmesg_err" ]; then
text+="**dmesg -l err** (erreur) \n"
text+='```\n'
text+="$dmesg_err \n"
text+='```\n'
text+='```\n\n'
fi
if [ "$dmesg_warn" ]; then
text+="**dmesg -l warn** (warning) \n"
text+='```\n'
text+="$dmesg_warn \n"
text+='```\n'
text+='```\n\n'
fi
if [ "$dmesg_crit" ]; then
text+="**dmesg -l crit** (critique) \n"
text+='```\n'
text+="$dmesg_crit \n"
text+='```\n'
text+='```\n\n'
fi
if [ -z "$dmesg_crit" ] && [ -z "$dmesg_warn" ] && [ -z "$dmesg_warn" ]; then
text+="**pas de messages** \n"
text+='```\n'
text+="pas de messages \n"
text+='```\n\n'
fi
if [ "$1" == "dmesg" ]; then
echo > "$fileOutput"
echo > "$fileOutput" # vidage $fileOutput
chown "$user_": "$fileOutput"
fi
echo -e "$text" >> "$fileOutput"
@ -722,29 +697,31 @@ fi_gpu(){
# local graphCards="$(lspci -nnk | grep -iEA 3 'vga|display|3d')"
local graphCards="$(lspci -nnvvv | grep -iEA 13 '^[0-9]+.*vga|display|3d')"
[ "$(which glxinfo)" ] && local openGl="$(glxinfo | grep 'OpenGL version string:')"
local extraitXorg="$(grep -E '\(WW\)|\(EE\)|\(NI\)|\(\?\?\)' /var/log/Xorg.*.log /home/$user_/.local/share/xorg/Xorg.*.log 2>/dev/null)"
local resolutions="$(xrandr --query | grep '^ *[0-9]' | head -n 10)"
local extraitXorg="$(grep -E '\(WW\)|\(EE\)|\(NI\)|\(\?\?\)' /var/log/Xorg.*.log /home/$user_/.local/share/xorg/Xorg.*.log 2>/dev/null)"
###
local text="## graphisme \n\n"
get_gpu; text+="**GPU: $gpu** \n"
get_resolution; text+="**résolution: $resolution** \n\n"
text+="\n**lspci -nnvvv | grep -iEA 13 '^[0-9]+.*vga|display|3d'** (matériel) \n"
text+="**lspci -nnvvv | grep -iEA 13 '^[0-9]+.*vga|display|3d'** (matériel) \n"
text+='```\n'
text+="$graphCards \n"
text+='```\n'
text+="\n**glxinfo | grep 'OpenGL version string:'** \n"
text+='```\n'
text+="$openGl \n"
text+='```\n'
text+='```\n\n'
if [ "$openGl" ]; then
text+="**glxinfo | grep 'OpenGL version string:'** \n"
text+='```\n'
text+="$openGl \n"
text+='```\n\n'
fi
text+="**xrandr --query | grep '^ *[0-9]' | head -n 10** (10 premières résolutions possibles) \n"
text+='```\n'
text+="$resolutions \n"
text+='```\n'
text+='```\n\n'
text+="**grep -E '\(WW\)|\(EE\)|\(NI\)|\(\?\?\)' /var/log/Xorg.*.log /home/user/.local/share/xorg/Xorg.*.log** (extrait xorg.log) \n"
[ "$noHome" == "true" ] && text+="attention pas de home utilisateur détecté \n"
text+='```\n'
text+="$extraitXorg \n"
text+='```\n'
text+='```\n\n'
get_modules video; text+="$exportText"
echo -e "$text" >> "$fileOutput"
}
@ -778,41 +755,41 @@ fi_localisation(){
local timezone="$(cat /etc/timezone)"
local keymap="$(setxkbmap -query)"
local keyboard="$(grep -vE '#|^$' /etc/default/keyboard)"
###
local text="## localisation \n\n"
text+="**grep -vE '#|^$' /etc/default/locale** \n"
text+='```\n'
text+="$locale \n"
text+='```\n'
text+='```\n\n'
text+="**cat /etc/timezone** \n"
text+='```\n'
text+="$timezone \n"
text+='```\n'
text+='```\n\n'
text+="**setxkbmap -query** \n"
text+='```\n'
text+="$keymap \n"
text+='```\n'
text+='```\n\n'
text+="**grep -vE '#|^$' /etc/default/keyboard** \n"
text+='```\n'
text+="$keyboard \n"
text+='```\n'
text+='```\n\n'
echo -e "$text" >> "$fileOutput"
}
fi_nm(){
[ -x "$(which nmcli)" ] || return 0 # root sur autre que debian?
[ -x "$(which nmcli)" ] || return 0 # root sur autre que debian?
local nm_etat="$(grep -vE '#|^$' /var/lib/NetworkManager/NetworkManager.state)"
local nm_conf="$(grep -vE '#|^$' /etc/NetworkManager/NetworkManager.conf)"
###
local text="## Network Manager \n\n"
text+="**grep -vE '#|^$' /var/lib/NetworkManager/NetworkManager.state** \n"
text+='```\n'
text+="$nm_etat \n"
text+='```\n'
text+='```\n\n'
text+="**grep -vE '#|^$' /etc/NetworkManager/NetworkManager.conf** \n"
text+='```\n'
text+="$nm_conf \n"
text+='```\n'
text+='```\n\n'
echo -e "$text" >> "$fileOutput"
}
@ -820,7 +797,7 @@ fi_nm_wifis(){
[ -x "$(which nmcli)" ] && [ -z "$1" ] || return 0
local nm_wifis="$(nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY device wifi list)"
local nm_connected="$(LC_ALL=C nmcli -f SSID,ACTIVE,IN-USE device wifi list | grep -E 'yes[[:space:]]+\*' | awk '{print $1}')" # non utilisé
###
local text="## wifis à proximité \n\n"
text+="**nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY device wifi list** \n"
text+='```\n'
@ -833,8 +810,9 @@ fi_reseau(){
local netcards="$(lspci -nnk | grep -iEA 3 'network|ethernet')"
# local netcards="$(lspci -nnvvv | grep -iEA 12 'network|ethernet')"
local ip_a="$(ip a | sed '/inet6.*scope global/d; /link\/ether/d; /valid_lft/d')" # filtre sur inet6 & scope global & adr MAC & bail?
local iwconfig="$(iwconfig 2>&1 | grep -v 'no wireless extensions' | grep -v '^$')"
if [ "$(which iwlist)" ]; then #paquet wireless-tools requis
local iwconfig="$(iwconfig 2>&1 | grep -v 'no wireless extensions' | grep -v '^$')"
fi
local interfaces="$(sed '/^#/d;s/^wpa-psk [[:graph:]]\+/wpa-psk <WPA key removed>/;/^$/d;s/\(.*\)/\1 /' /etc/network/interfaces)"
local route="$(ip route show)"
local resolv="$(grep -vE '#|^$' /etc/resolv.conf)"
@ -845,7 +823,7 @@ fi_reseau(){
if [ "$(ps -ef | grep -c ${netmgrpaths[$ii]})" -ge 2 ]; then netmgrrun+="$(ps -ef | grep -o "${netmgrpaths[$ii]}.*$" | head -n 1)"; fi
done
local text="## réseau \n\n"
if [ "$(which iwlist)" ]; then # liste canaux wifi paquet wireless-tools requis
if [ "$(which iwlist)" ]; then # liste canaux wifi; paquet wireless-tools requis
local liste_canaux_wifi="$(iwlist chan 2>&1 | grep -vE 'no frequency information|^$')"
fi
###
@ -889,6 +867,12 @@ fi_reseau(){
text+='```\n'
text+="$resolv \n"
text+='```\n\n'
if [ "$liste_canaux_wifi" ]; then
text+="**iwlist chan** \n"
text+='```\n'
text+="$liste_canaux_wifi \n"
text+='```\n\n'
fi
if [ "$netmgrinst" ]; then
text+="### network managers \n\n"
[ "$netmgrinst" ] && text+="installé(s): **$netmgrinst** \n" || text+="non trouvé parmi: ${netmgrnames[@]} \n"
@ -896,82 +880,84 @@ fi_reseau(){
[ "$netmgrrun" ] && text+="**$netmgrrun** \n" || text+="non trouvé \n"
get_modules net; text+="$exportText"
fi
if [ "$liste_canaux_wifi" ]; then
text+="**iwlist chan** \n"
text+='```\n'
text+="$liste_canaux_wifi \n"
text+='```\n\n'
fi
echo -e "$text" >> "$fileOutput"
}
fi_sources(){
[ "$(which apt)" ] || return 0 # retour si pas d'apt ? et aptitude...????
printf "."
local sources="$(grep -rvE '^#|^$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list 2>/dev/null | sed 's/ / /g; s/:/: /')"
local dateMaj="$(date -r /var/cache/apt/archives/)"
local httpredir="$(grep 'httpredir' /etc/apt/sources.list /etc/apt/sources.list.d/*.list 2>/dev/null)"
local upgradable="$(LC_ALL=C apt list --upgradable 2>/dev/null | sed 's/Listing...//' | grep -v '^$')"
printf "."
local apt="$(LC_ALL=C apt-get autoremove --simulate)"
local autoremove="$(grep -c 'Remv' <<< $apt)"
local paquetToRemove="$(grep 'Remv' <<< $apt | sed 's/Remv //; s/\[[0-9.-]*\]//' | tr '\n' ' ')"
printf "."
local httpredir="$(grep 'httpredir' /etc/apt/sources.list /etc/apt/sources.list.d/*.list 2>/dev/null)"
local upgradable="$(LC_ALL=C apt list --upgradable 2>/dev/null | sed 's/Listing...//' | grep -v '^$')"
printf "."
local dpkgArch="$(dpkg --print-architecture)"
local paquetBiz="$(dpkg -l | grep -v '^i' | grep "$dpkgArch" | awk '{print $1, $2, $3}')"
###
local text+="## sources list \n\n"
text+="**grep -rvE '^#|^$' /etc/apt/sources.list /etc/apt/sources.list.d/*.list 2>/dev/null** \n"
text+='```\n'
text+="$sources \n"
text+='```\n'
text+='```\n\n'
text+="dernière mise à jour **apt**: $dateMaj \n\n"
if [ $autoremove -ne 0 ] ; then
text+="**$autoremove paquet(s) installé(s) inutile(s)**, vous pouvez utiliser: apt autoremove. paquet(s) concerné(s): \n"
if [ "$autoremove" -ne 0 ] ; then
text+="**$autoremove paquet(s) installé(s) inutile(s)**, vous pouvez utiliser: "'`apt autoremove`'" \n"
text+="paquet(s) concerné(s): \n"
text+='```\n'
text+="$paquetToRemove \n"
text+='```\n'
text+='```\n\n'
fi
if [ "$httpredir" ]; then
text+="url **httpredir,** ces urls sont obsolètes, préférer http://deb.debian.org/debian/ ou un miroir local\n"
text+='```\n'
text+="$httpredir \n"
text+='```\n'
text+='```\n\n'
fi
if [ "$upgradable" ]; then
text+="**des paquets devraient être mis à jour:** \n"
text+="**apt list --upgradable** \n"
text+="**des paquets devraient être mis à jour.** "'`apt list --upgradable`'" \n"
text+='```\n'
text+="$upgradable \n"
text+='```\n'
text+='```\n\n'
fi
if [ "$paquetBiz" ]; then
text+="il y a des **paquet(s) dans un état non installé**. ce n'est pas forcément grave, mais ça peut être examiné. paquet(s) concerné(s): \n"
text+="il y a des **paquet(s) dans un état non installé**. ce n'est pas forcément grave, mais ça peut être examiné. \n"
text+="paquet(s) concerné(s): \n"
text+='```\n'
text+="$paquetBiz \n"
text+='```\n'
text+='```\n\n'
fi
echo -e "$text" >> "$fileOutput"
}
fi_ssid(){ # affiche configurations ssid
[ "$(which nmcli)" ] || f__error "il faut NetworkManager"
[ $EUID -eq 0 ] || f__error "il faut les droits root"
[ "$(which nmcli)" ] || f__error "il manque NetworkManager"
[ $EUID -eq 0 ] || f__error "il manque les droits root"
local nm_ssid="$(grep -vE '#|^$' /etc/NetworkManager/system-connections/*)"
local text="## configuration(s) ssid networkmanager \n\n"
###
f__info="$RED""Attention, la clé du réseau wifi est visible $COLOR""aucun rapport n'a été créé"
text+='```\n'
text+="$nm_ssid \n"
text+='```\n'
text+='```\n\n'
echo -e "$text"
}
fi_system_analyse(){
[ -x "$(which systemd-analyze)" ] || return 0 # pas systemd
local bootTime="$(systemd-analyze time)"
local bootBlame="$(systemd-analyze blame | head -n 20)"
###
local text="## analyse boot \n\n"
text+="$(sed 's/Startup finished in /durée de boot: /; s/userspace/espace utilisateur/' <<< $bootTime) \n\n"
text+="$(sed 's/Startup finished in /**durée de boot:** /; s/userspace/espace utilisateur/; s/= \(.*\)$/= **\1**/' <<< $bootTime) \n\n"
text+="**systemd-analyze blame | head -n 20** \n"
text+='```\n'
text+="$bootBlame \n"
text+='```\n'
text+='```\n\n'
echo -e "$text" >> "$fileOutput"
}
@ -1016,24 +1002,49 @@ fi_systeme(){
fi_usb(){
local lsusb="$(lsusb)"
local lsusb_t="$(lsusb -t)"
###
local text="## périphériques USB \n\n"
text+="**lsusb** \n"
text+='```\n'
text+="$lsusb \n"
text+='```\n'
text+='```\n\n'
text+="**lsusb -t** \n"
text+='```\n'
text+="$lsusb_t \n"
text+='```\n'
text+='```\n\n'
echo -e "$text" >> "$fileOutput"
}
fi_paste(){
paste(){
paste_curl_pastery "$fileOutput" "$PasteDuration" "$optDebug"
# à tester paste_curl_markdownshare "$fileOutput"
}
paste_curl_pastery(){ # $1 fichier à exporter, $2 durée de conservation en jour; $3 debug
[ -e "$1" ] || f__error "fichier $1 inexistant"
# curl -X POST "https://www.pastery.net/api/paste/?title=getInfo&language=markdown" -F file=@$1
local curl="$(curl --silent -X POST "https://www.pastery.net/api/paste/?title=getInfo_$version&language=markdown&duration=$(($2*1440))" --data-binary @$1)"
local id="$(echo $curl | cut -d '"' -f 4)"
f__info "\n\n votre paste:" "https://www.pastery.net/$id/"
[ "$3" == "debug" ] && echo -e "\n$curl\n"
# ?api_key=<api_key>
# &duration=<duration> en mn, 1 jour par défaut
# &language=autodetect possible
# &max_views=<max_views>
# 100ko max
}
paste_curl_markdownshare(){
[ -e "$1" ] || f__error "fichier $1 inexistant"
curl -H "Accept: application/json" -X POST -F "text=<$1" https://markdownshare.com/create/
#-A, --user-agent and -e, --referer options
#If you wish to allow a post to expire then add an expire= parameter too:
#expire=Nh Expire in N hours.
#expire=Nd Expire in N days.
#-d expire ? ou --data expire
}
# initialisation
PATH='/usr/sbin:/usr/bin:/sbin:/bin' ; IFS=' '
@ -1045,7 +1056,7 @@ f__user || ( [ "$?" -eq 2 ] && noHome="true" )
f__requis "gawk wget curl ip>iproute2" # pour fonctionnement programme
fi__context
prg_1(){ # début programme
prg_1(){ # début
rm "$fileOutput" &>/dev/null
touch "$fileOutput"
chown $user_: "$fileOutput"
@ -1055,10 +1066,6 @@ prg_1(){ # début programme
echo -e "# getInfo $version sur $hote / $os \n" > "$fileOutput"
echo -e "Rapport au $dateRapport \n" >> "$fileOutput"
}
prg_2test(){ # traitements tests
printf "."
fi_reseau; printf "."
}
prg_2(){ # traitements principaux
printf "."
fi_systeme; printf "."
@ -1075,10 +1082,8 @@ prg_2(){ # traitements principaux
fi_dmesg; printf ".\n"
}
prg_3(){ # fin de traitements
echo "[rapport getInfo v$version]($urlNotice)" >> "$fileOutput"
if ! fi__dialog_oui_non "non" "exporter sur un pastebin par défaut?" ; then
fi_paste
fi
echo -e "[rapport getInfo v$version]($urlNotice)\n" >> "$fileOutput"
fi__dialog_oui_non "non" "exporter sur un pastebin par défaut?" || paste
f__info "\n$GREEN le rapport est disponible en local, fichier: $fileOutput"
f__info "vous pouvez le visualiser avec $GREEN$script -l$COLOR"
}
@ -1086,31 +1091,31 @@ prg_3(){ # fin de traitements
options="$@"
for i in "$options"; do
case $i in
--dmesg | -d )
fi_dmesg "dmesg"
prg_3 ;; # rapport dmesg only, root requis
--list | -l ) [ -e $fileOutput ] && cat $fileOutput || f__info "pas de rapport à afficher" ;; # afficher le rapport existant
--paste | -p ) fi_paste ;; # exporte le rapport existant
--ssid | -s ) fi_ssid ;; # affiche configurations ssid, root requis
--install | -i ) fscript_install ;; # installation du script dans le système
--remove | -r ) fscript_remove ;; # suppression du script dans le système
--upgrade | -u )
opType="upgrade"
fscript_get_version
fscript_dl ;; # upgrade script si maj possible
--version | -v ) fscript_get_version ;; # version du script, en ligne et exécuté
"" ) if [ $# -eq 0 ];then
prg_1
prg_2
prg_3
fi ;; # programme
--dmesg | -d )
fi_dmesg "dmesg"
prg_3 ;; # rapport dmesg only, root requis
--ip )
get_ip_public "IPv4"
[ "$ip_public" ] && f__info "raw" "$GREEN ip4: $ip_public"
get_ip_public "IPv6"
[ "$ip_public" ] && f__info "raw" "$BLUE""ip6: $ip_public"
[ "$ip_public" ] && f__info "raw" "$BLUE ip6: $ip_public\n"
;; # affiche ip public
--upgrade | -u )
opType="upgrade"
fscript_get_version
fscript_dl ;; # upgrade script si maj possible
--help | -h | * ) fi_help ;; # affichage help
--help | -h | * ) fi_help ;; # affichage help
esac
done

View File

@ -4,6 +4,10 @@
* adresses MAC?
## 1.0.7 19/08/2017
* révision mise en page
## 1.0.6 18/08/2017
* maj fscript_cronAnacron lors upgrade et spécial pour dev