Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Boot Screen/Log Screen - adequate font for my 12.1" screen

Message
Author
User avatar
baldyeti
Forum Regular
Forum Regular
Posts: 109
Joined: Sat Dec 05, 2009 4:37 pm

Re: Boot Screen/Log Screen - adequate font for my 12.1" screen

#11 Post by baldyeti » Sat Nov 10, 2018 2:09 pm

Buck, i think you should include your script between CODE tags rather than QUOTE in order to preserve the indentation which matters for python

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 175
Joined: Sat Mar 10, 2018 9:06 pm

Re: Boot Screen/Log Screen - adequate font for my 12.1" screen

#12 Post by Buck Fankers » Sat Nov 10, 2018 2:10 pm

Here is an example of part of the output on my computer:
$ python3 mxlogs.py
======================
| dmesg | grep error | Shows kernel errors
======================
[ 3.374031] print_req_error: I/O error, dev fd0, sector 0
[ 3.374081] floppy: error 10 while reading block 0

=====================
| dmesg | grep fail | Shows kernel fails
=====================
[ 0.005000] tsc: Fast TSC calibration failed
[ 0.231670] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM

========================
| dmesg | grep warning | Shows kernel warnings
========================
[ 0.000000] ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Gpe0Block: 128/64 (20170831/tbfadt-603)
[ 0.000000] ACPI BIOS Warning (bug): Incorrect checksum in table [TCPA] - 0x00, should be 0x87 (20170831/tbprint-211)
[ 7.150278] ACPI Warning: SystemIO range 0x0000000000000828-0x000000000000082F conflicts with OpRegion 0x0000000000000828-0x000000000000082D (\GLBC) (20170831/utaddress-247)
[ 7.150283] ACPI Warning: SystemIO range 0x0000000000000828-0x000000000000082F conflicts with OpRegion 0x000000000000082A-0x000000000000082A (\SACT) (20170831/utaddress-247)
[ 7.150286] ACPI Warning: SystemIO range 0x0000000000000828-0x000000000000082F conflicts with OpRegion 0x0000000000000828-0x0000000000000828 (\SSTS) (20170831/utaddress-247)
[ 7.150291] ACPI Warning: SystemIO range 0x00000000000008B0-0x00000000000008BF conflicts with OpRegion 0x00000000000008B8-0x00000000000008BB (\GIC2) (20170831/utaddress-247)
[ 7.150295] ACPI Warning: SystemIO range 0x0000000000000880-0x00000000000008AF conflicts with OpRegion 0x000000000000088C-0x000000000000088F (\GIC1) (20170831/utaddress-247)

======================
| dmesg | grep disabled | Shows kernel disabled
======================
[ 0.000000] 3 disabled
[ 0.000000] 4 disabled
[ 0.000000] 5 disabled
[ 0.000000] 6 disabled
[ 0.000000] 7 disabled
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.007000] Yama: disabled by default; enable with sysctl kernel.yama.*
[ 0.023326] audit: initializing netlink subsys (disabled)
[ 0.275967] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12 15) *0, disabled.
[ 8.173858] kvm: disabled by bios
[ 8.318077] iTCO_wdt: unable to reset NO_REBOOT flag, device disabled by hardware/BIOS
[ 72.611989] sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

==============
| Xorg.0.log | "Xorg.0.log", Lists entries with failed, error & (WW) keywords
==============
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 24.755] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 25.432] (WW) Warning, couldn't open module nv
[ 25.506] (WW) Falling back to old probe method for modesetting
[ 25.506] (WW) Falling back to old probe method for fbdev
[ 25.539] (WW) Falling back to old probe method for vesa
[ 28.511] (WW) evdev: SEM USB Keyboard: ignoring absolute axes.
[ 28.567] (WW) evdev: Logitech USB Receiver: ignoring absolute axes.

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 175
Joined: Sat Mar 10, 2018 9:06 pm

Re: Boot Screen/Log Screen - adequate font for my 12.1" screen

#13 Post by Buck Fankers » Sat Nov 10, 2018 2:12 pm

baldyeti wrote:
Sat Nov 10, 2018 2:09 pm
Buck, i think you should include your script between CODE tags rather than QUOTE in order to preserve the indentation which matters for python
Ups, my bad, thank you, here it is:

Code: Select all

#!/usr/bin/env python

import os


def inxi():
    """ Return some basic information about computer hardware, OS, software... """
    print()
    print('===============')
    print('| Inxi -Fxxxz |   Computer information')
    print('===============')
    try:
        os.system('inxi -Fxxxz')
        print()
    except:
        print('Do you have installed: "inxi" on your system? ')


def dmesg_error():
    print('======================')
    print('| dmesg | grep error |   Shows kernel errors')
    print('======================')
    try:
        os.system('dmesg | grep error')
        print()
    except:
        print('dmesg | grep error is not working...')


def dmesg_fail():
    print('=====================')
    print('| dmesg | grep fail |   Shows kernel fails')
    print('=====================')
    try:
        os.system('dmesg | grep fail')
        print()
    except:
        print('dmesg | grep fail is not working...')


def dmesg_warning():
    print('========================')
    print('| dmesg | grep warning |   Shows kernel warnings')
    print('========================')
    try:
        os.system('dmesg | grep Warning')
        print()
    except:
        print('dmesg | grep warning is not working...')


def dmesg_disabled():
    print('======================')
    print('| dmesg | grep disabled |   Shows kernel disabled')
    print('======================')
    try:
        os.system('dmesg | grep disabled')
        print()
    except:
        print('dmesg | grep disabled is not working...')


def boot_warning():
    """ from boot file print lines that contain words: warning """
    try:
        with open('/var/log/boot', 'r') as f:
            print('===================')
            print('| boot | warnings |  "boot", Lists entries with "warning" keywords')
            print('===================')
            for line in f:
                if 'failed' in line or 'error' in line or 'warning' in line:
                    print(line, end='')
        print()
    except:
        print('Missing file: /var/log/boot')


def hwinfo_gfxcard():
    """ Info about installed graphic card """
    print('====================')
    print("| hwinfo --gfxcard |   Info about your graphic card.")
    print('====================')
    try:
        os.system('hwinfo --gfxcard')
        print()
        print()
    except:
        print('Do you have installed: "hwinfo" on your system? ')


def mem():
    """Info about memory and swap partition"""
    print('=============')
    print("|  free -h  |   Shows memory and swap info")
    print('=============')
    os.system('free -h')
    print()


def lsblk():
    """ Info about drives and partitions """
    print('=============')
    print("|   lsblk   |   List drives and partitions")
    print('=============')
    os.system('lsblk')
    print()


def df():
    """ Info about remaining free space on partitions """
    print('==========')
    print("|   df   |   How much free disk space is left for each partition?")
    print('==========')
    os.system('df')
    print()


def read_xorg0():
    """ from Xorg.0.log print lines that contain words: failed, error, (WW) """
    try:
        with open('/var/log/Xorg.0.log', 'r') as f:
            print('==============')
            print('| Xorg.0.log |  "Xorg.0.log", Lists entries with failed, error & (WW) keywords')
            print('==============')
            for line in f:
                if 'failed' in line or 'error' in line or '(WW)' in line:
                    print(line, end='')
        print()
    except:
        print('Missing file: Xorg.0.log')


def read_xorg0old():
    """ from Xorg.0.log.old print lines that contain words: failed, error, (WW) """
    try:
        with open('/var/log/Xorg.0.log.old', 'r') as f:
            print('==================')
            print('| Xorg.0.log.old |  "Xorg.0.log.old", Lists entries with failed, error & (WW) keywords')
            print('==================')
            for line in f:
                if 'failed' in line or 'error' in line or '(WW)' in line:
                    print(line, end='')
        print()
    except:
        print('Missing file: Xorg.1.log')


dmesg_error()
dmesg_fail()
dmesg_warning()
dmesg_disabled()
#boot_warning()
read_xorg0()
read_xorg0old()
#hwinfo_gfxcard()
#mem()
#lsblk()
#df()
#inxi()
print('... finished :-)')

User avatar
penguin
Forum Regular
Forum Regular
Posts: 287
Joined: Wed Jan 04, 2017 3:15 pm

Re: Boot Screen/Log Screen - adequate font for my 12.1" screen

#14 Post by penguin » Sat Nov 10, 2018 3:25 pm

here is mine :D !
python3 logs.py
======================
| dmesg | grep error | Shows kernel errors
======================

=====================
| dmesg | grep fail | Shows kernel fails
=====================
[ 0.072368] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[ 0.073133] acpi PNP0A08:00: _OSC failed (AE_SUPPORT); disabling ASPM
[ 7.942680] intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled until i915 loads

========================
| dmesg | grep warning | Shows kernel warnings
========================
[ 0.000000] ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Pm1aControlBlock: 16/32 (20170531/tbfadt-603)
[ 0.000000] ACPI BIOS Warning (bug): Invalid length for FADT/Pm1aControlBlock: 32, using default 16 (20170531/tbfadt-708)
[ 7.899513] ACPI Warning: SystemIO range 0x0000000000001028-0x000000000000102F conflicts with OpRegion 0x0000000000001000-0x000000000000107F (\_SB.PCI0.LPC.PMIO) (20170531/utaddress-247)
[ 7.899526] ACPI Warning: SystemIO range 0x00000000000011C0-0x00000000000011CF conflicts with OpRegion 0x0000000000001180-0x00000000000011FF (\_SB.PCI0.LPC.LPIO) (20170531/utaddress-247)
[ 7.899533] ACPI Warning: SystemIO range 0x00000000000011B0-0x00000000000011BF conflicts with OpRegion 0x0000000000001180-0x00000000000011FF (\_SB.PCI0.LPC.LPIO) (20170531/utaddress-247)
[ 7.899539] ACPI Warning: SystemIO range 0x0000000000001180-0x00000000000011AF conflicts with OpRegion 0x0000000000001180-0x00000000000011FF (\_SB.PCI0.LPC.LPIO) (20170531/utaddress-247)

======================
| dmesg | grep disabled | Shows kernel disabled
======================
[ 0.000000] 0 disabled
[ 0.000000] 6 disabled
[ 0.000000] 7 disabled
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.013499] Yama: disabled by default; enable with sysctl kernel.yama.*
[ 0.071740] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 11) *0, disabled.
[ 0.072059] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 11) *0, disabled.
[ 0.072146] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 11) *0, disabled.
[ 0.645425] audit: initializing netlink subsys (disabled)
[ 1.595038] ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled
[ 7.942680] intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled until i915 loads
[ 8.033067] kvm: disabled by bios
[ 8.043414] [drm] RC6 disabled, disabling runtime PM support
[ 8.050438] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG disabled
[ 8.050441] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUGFS disabled
[ 8.050443] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled

==============
| Xorg.0.log | "Xorg.0.log", Lists entries with failed, error & (WW) keywords
==============
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 16.720] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 16.945] (WW) Falling back to old probe method for fbdev
[ 16.959] (WW) Falling back to old probe method for vesa

Missing file: Xorg.1.log
... finished :-)
but...

I have some Warning on /var/log/boot

Example :
Sun Jan 28 19:25:58 2018: [....] VirtualBox Additions disabled, not in a Virtual Machine ...^[[?25l^[[?1c^[7^[[1G[^[[33mwarn^[[39;49m^[8^[[?25h^[[?0c ^[[33m(warning).^[[39;49m

Fri Nov 9 23:40:31 2018: [....] Setting up LVM Volume Groups... WARNING: Failed to connect to lvmetad. Falling back to device scanning
Fri Nov 9 23:40:35 2018: [....] Not starting NFS kernel daemon: no exports. ...^[[?25l^[[?1c^[7^[[1G[^[[33mwarn^[[39;49m^[8^[[?25h^[[?0c ^[[33m(warning).^[[39;49m
Your follow piece of script did not catch this warning messages .
def boot_warning():
""" from boot file print lines that contain words: warning """
try:
with open('/var/log/boot', 'r') as f:
print('===================')
print('| boot | warnings | "boot", Lists entries with "warning" keywords')
print('===================')
for line in f:
if 'failed' in line or 'error' in line or 'warning' in line:
print(line, end='')
print()
except:
print('Missing file: /var/log/boot')
Can you check manually your /var/log/boot file ?

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 175
Joined: Sat Mar 10, 2018 9:06 pm

Re: Boot Screen/Log Screen - adequate font for my 12.1" screen

#15 Post by Buck Fankers » Sat Nov 10, 2018 3:58 pm

penguin wrote:
Sat Nov 10, 2018 3:25 pm
here is mine :D !

Missing file: Xorg.1.log
... finished :-)
[/quote]

I'm glad it is working for you ;-)
I think it does helps if all errors and such are pulled all together.

That print out should say: "Missing file: Xorg.0.log.old" my error since I used this script on another Linux (Manjaro) where previous Xorg log is stored as: Xorg.1.log

But what that print out means is, that script didn't find previous Xorg log file on your system. Check if you have file: /var/log/Xorg.0.log.old

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 175
Joined: Sat Mar 10, 2018 9:06 pm

Re: Boot Screen/Log Screen - adequate font for my 12.1" screen

#16 Post by Buck Fankers » Sat Nov 10, 2018 4:16 pm

penguin wrote:
Sat Nov 10, 2018 3:25 pm
but...

I have some Warning on /var/log/boot

Example :

Sun Jan 28 19:25:58 2018: [....] VirtualBox Additions disabled, not in a Virtual Machine ...^[[?25l^[[?1c^[7^[[1G[^[[33mwarn^[[39;49m^[8^[[?25h^[[?0c ^[[33m(warning).^[[39;49m

Fri Nov 9 23:40:31 2018: [....] Setting up LVM Volume Groups... WARNING: Failed to connect to lvmetad. Falling back to device scanning
Fri Nov 9 23:40:35 2018: [....] Not starting NFS kernel daemon: no exports. ...^[[?25l^[[?1c^[7^[[1G[^[[33mwarn^[[39;49m^[8^[[?25h^[[?0c ^[[33m(warning).^[[39;49m

Your follow piece of script did not catch this warning messages .
I have turned off reporting boot log warning msgs because I had them so many I though something is wrong with the script. You can enable it easy:

Open mxlogs.py with any text editor and look at the bottom of the file, you will see this:

Code: Select all

dmesg_error()
dmesg_fail()
dmesg_warning()
dmesg_disabled()
#boot_warning()
read_xorg0()
read_xorg0old()
#hwinfo_gfxcard()
#mem()
#lsblk()
#df()
#inxi()
print('... finished :-)')
those that have "hashtag" in front are switched off, so for boot warnings to be seen, change:
#boot_warning()
into
boot_warning()
Save file and run the script again. You can the same way 'unlock' or say turn on all other lines quoted above, that have hastag in front of them

If you get too much info, turn it back off

I had a script that you could do all this through GUI, by clicking with the mouse which pieces of info to show. But once someone experienced coder helped me with some problem and completely redid the code I didn't know any more what it does (beginner wanna be coder here) and I just dropped it. Besides, if someone has GUI problems and StartX does not start, you need CLI version anyway.

Hence this clumsy way of switching info on and off.

User avatar
penguin
Forum Regular
Forum Regular
Posts: 287
Joined: Wed Jan 04, 2017 3:15 pm

Re: Boot Screen/Log Screen - adequate font for my 12.1" screen

#17 Post by penguin » Sat Nov 10, 2018 4:22 pm

Buck Fankers wrote:
Sat Nov 10, 2018 4:16 pm
penguin wrote:
Sat Nov 10, 2018 3:25 pm
but...

I have some Warning on /var/log/boot

Example :

Sun Jan 28 19:25:58 2018: [....] VirtualBox Additions disabled, not in a Virtual Machine ...^[[?25l^[[?1c^[7^[[1G[^[[33mwarn^[[39;49m^[8^[[?25h^[[?0c ^[[33m(warning).^[[39;49m

Fri Nov 9 23:40:31 2018: [....] Setting up LVM Volume Groups... WARNING: Failed to connect to lvmetad. Falling back to device scanning
Fri Nov 9 23:40:35 2018: [....] Not starting NFS kernel daemon: no exports. ...^[[?25l^[[?1c^[7^[[1G[^[[33mwarn^[[39;49m^[8^[[?25h^[[?0c ^[[33m(warning).^[[39;49m

Your follow piece of script did not catch this warning messages .
I have turned off reporting boot log warning msgs because I had them so many I though something is wrong with the script. You can enable it easy:

Open mxlogs.py with any text editor and look at the bottom of the file, you will see this:

Code: Select all

dmesg_error()
dmesg_fail()
dmesg_warning()
dmesg_disabled()
#boot_warning()
read_xorg0()
read_xorg0old()
#hwinfo_gfxcard()
#mem()
#lsblk()
#df()
#inxi()
print('... finished :-)')
those that have "hashtag" in front are switched off, so for boot warnings to be seen, change:
#boot_warning()
into
boot_warning()
Save file and run the script again. You can the same way 'unlock' or say turn on all other lines quoted above, that have hastag in front of them

If you get too much info, turn it back off

I had a script that you could do all this through GUI, by clicking with the mouse which pieces of info to show. But once someone experienced coder helped me with some problem and completely redid the code I didn't know any more what it does (beginner wanna be coder here) and I just dropped it. Besides, if someone has GUI problems and StartX does not start, you need CLI version anyway.

Hence this clumsy way of switching info on and off.
Hmmmm...
I did not noticed that. But..... A small modification can improve things.
Lets say:
Version 1 - Script ask user for date (user write date on terminal) and script check for Warning message on this date.
Version2 - Script get date from system and check for Warning messages on the system date.

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 175
Joined: Sat Mar 10, 2018 9:06 pm

Re: Boot Screen/Log Screen - adequate font for my 12.1" screen

#18 Post by Buck Fankers » Sat Nov 10, 2018 4:34 pm

I'm sure this can probably be easy to implement, but for now I'm way too green with Python programming language to be able to pull this off.

Maybe someone else can improve the code and also add the rest of the important log reporting if there are any more.

Maybe I could get a current date into code through python and then parse log by matching date from log and current date, but this too for now may be over my head. Plus I'm working on one personal project that is very important to me and is right now getting all of my attention. In a week or two I will give it a try but no promises I may not be able to do it. I will try though.

Post Reply

Return to “Hardware /Configuration”