Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] journalctl output color codes messed up
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
equaeghe
l33t
l33t


Joined: 22 Feb 2005
Posts: 652

PostPosted: Fri Mar 20, 2020 12:54 pm    Post subject: [solved] journalctl output color codes messed up Reply with quote

I have a Gentoo VPS where I use systemd/journalctl, as I do on my laptop. On my laptop, colored output of journalctl works as it should. When ssh'ing into my VPS and looking at colored output, the color codes show, seem duplicated and some colors are shown and some are not. When consulting man pages, no such issue exists.

Example output from VPS (on every line everything after the first '245m' is red):
Code:
kernel: ^[[0;38;5;245m^[[0;38;5;245me820: update [mem 0x00000000-0x00000fff] usable ==> reserved
kernel: ^[[0;38;5;245m^[[0;38;5;245me820: remove [mem 0x000a0000-0x000fffff] usable
kernel: last_pfn = 0x3fffa max_arch_pfn = 0x400000000
kernel: ^[[0;38;5;245m^[[0;38;5;245mMTRR default type: write-back
kernel: ^[[0;38;5;245m^[[0;38;5;245mMTRR fixed ranges enabled:
kernel: ^[[0;38;5;245m^[[0;38;5;245m  00000-9FFFF write-back
kernel: ^[[0;38;5;245m^[[0;38;5;245m  A0000-BFFFF uncachable
kernel: ^[[0;38;5;245m^[[0;38;5;245m  C0000-FFFFF write-protect
kernel: ^[[0;38;5;245m^[[0;38;5;245mMTRR variable ranges enabled:
kernel: ^[[0;38;5;245m^[[0;38;5;245m  0 base 0000E0000000 mask 3FFFE0000000 uncachable
kernel: ^[[0;38;5;245m^[[0;38;5;245m  1 disabled
kernel: ^[[0;38;5;245m^[[0;38;5;245m  2 disabled
kernel: ^[[0;38;5;245m^[[0;38;5;245m  3 disabled
kernel: ^[[0;38;5;245m^[[0;38;5;245m  4 disabled
kernel: ^[[0;38;5;245m^[[0;38;5;245m  5 disabled
kernel: ^[[0;38;5;245m^[[0;38;5;245m  6 disabled
kernel: ^[[0;38;5;245m^[[0;38;5;245m  7 disabled
kernel: x86/PAT: PAT not supported by CPU.
kernel: x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC
kernel: ^[[0;38;5;245m^[[0;38;5;245mBRK [0x28001000, 0x28001fff] PGTABLE
kernel: ^[[0;38;5;245m^[[0;38;5;245mBRK [0x28002000, 0x28002fff] PGTABLE
kernel: ^[[0;38;5;245m^[[0;38;5;245mBRK [0x28003000, 0x28003fff] PGTABLE
kernel: ^[[0;38;5;245m^[[0;38;5;245mBRK [0x28004000, 0x28004fff] PGTABLE
kernel: ^[[0;38;5;245m^[[0;38;5;245mBRK [0x28005000, 0x28005fff] PGTABLE


The ‘corresponding’ lines in my latop's journal (the lines with color above are now colored gray, as they should be):
Code:
kernel: e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
kernel: e820: remove [mem 0x000a0000-0x000fffff] usable
kernel: last_pfn = 0x41e600 max_arch_pfn = 0x400000000
kernel: MTRR default type: uncachable
kernel: MTRR fixed ranges enabled:
kernel:   00000-9FFFF write-back
kernel:   A0000-BFFFF uncachable
kernel:   C0000-FFFFF write-protect
kernel: MTRR variable ranges enabled:
kernel:   0 base 0FFC00000 mask FFFC00000 write-protect
kernel:   1 base 000000000 mask F80000000 write-back
kernel:   2 base 080000000 mask FC0000000 write-back
kernel:   3 base 0C0000000 mask FE0000000 write-back
kernel:   4 base 0DC000000 mask FFC000000 uncachable
kernel:   5 base 0DB000000 mask FFF000000 uncachable
kernel:   6 base 100000000 mask F00000000 write-back
kernel:   7 base 200000000 mask E00000000 write-back
kernel:   8 base 400000000 mask FE0000000 write-back
kernel:   9 base 41F000000 mask FFF000000 uncachable
kernel: x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT
kernel: last_pfn = 0xdb000 max_arch_pfn = 0x400000000
kernel: Scanning 1 areas for low memory corruption
kernel: reserving inaccessible SNB gfx pages
kernel: BRK [0x26a401000, 0x26a401fff] PGTABLE
kernel: BRK [0x26a402000, 0x26a402fff] PGTABLE
kernel: BRK [0x26a403000, 0x26a403fff] PGTABLE
kernel: BRK [0x26a404000, 0x26a404fff] PGTABLE
kernel: BRK [0x26a405000, 0x26a405fff] PGTABLE
kernel: BRK [0x26a406000, 0x26a406fff] PGTABLE
kernel: BRK [0x26a407000, 0x26a407fff] PGTABLE
kernel: BRK [0x26a408000, 0x26a408fff] PGTABLE
kernel: BRK [0x26a409000, 0x26a409fff] PGTABLE
kernel: BRK [0x26a40a000, 0x26a40afff] PGTABLE
kernel: BRK [0x26a40b000, 0x26a40bfff] PGTABLE


I have another VPS (with Ubuntu), where the journalctl output is properly colored.

What might be the issue on my Gentoo VPS setup. I'm assuming it is some misconfiguration, but have no clue where to start looking.


Last edited by equaeghe on Sat Mar 21, 2020 12:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
equaeghe
l33t
l33t


Joined: 22 Feb 2005
Posts: 652

PostPosted: Sat Mar 21, 2020 12:08 pm    Post subject: Reply with quote

I discovered it myself: on my VPS I hadn't set SYSTEMD_PAGER to /usr/bin/less, but my PAGER was used (most). So to fix it, I added a file systemd_pager.sh to /etc/profile.d with as contents
Code:
export SYSTEMD_PAGER=/usr/bin/less
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum