You are not logged in.
Pages: 1
Hello everyone. I recently changed my Linux distro to Arch Linux. I installed LXDE as my Desktop Environment. I have also installed vnstat from Community repository to monitor my network usage.
$ pacman -Ss vnstat
community/vnstat 1.14-1 [installed]
A console-based network traffic monitor
$ pacman -Qi vnstat
Name : vnstat
Version : 1.14-1
Description : A console-based network traffic monitor
Architecture : x86_64
URL : http://humdi.net/vnstat/
Licenses : GPL
Groups : None
Provides : None
Depends On : bash
Optional Deps : gd: image output [installed]
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 338.00 KiB
Packager : Sergej Pupykin <pupykin.s+arch@gmail.com>
Build Date : Tuesday 28 April 2015 12:20:11 AM IST
Install Date : Wednesday 01 July 2015 05:37:51 PM IST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
Whenever I type vnstat in LXTerminal to see the network usage, I see some weird characters in the output (View Attachment at the end for getting the idea).
I am using zsh as shell interpreter. My pc character encoding details is given below:
$ locale -a
C
en_IN
en_IN.utf8
POSIX
Can anyone help me solve this issue please? I am attaching the outputs below.
PS: The image has been modified using GIMP to erase username and hostname only (Output was not tampered in any way though!). Also as it was cropped from a whole Desktop screenshot to remove unneccecary parts, it was scaled somewhat too. I don't think these will cause any problems as the output is still well understandable but just stating in case some problem arises.
Last edited by nlern (2015-07-25 02:22:45)
Offline
Test vnstat in xterm and a normal tty. If both are fine, then there is a problem with VTE. I've had similar problems in Sakura.
Last edited by Awebb (2015-07-21 10:57:38)
Offline
@Awebb, weird characters are showing in xterm and other ttys too. So is it because the character it prints out is not included in the fonts I use? I am currently using DejaVu Sans Condensed (Size: 10) as my default font.
Last edited by nlern (2015-07-21 11:06:05)
Offline
The tty does not use those fonts. Try the generic C locale or en_US.utf8 to rule out your locale as the problem.
Offline
Try the generic C locale or en_US.utf8 to rule out your locale as the problem.
This.
Since OP has already C locale enabled, he can simply run
LC_ALL=C <command>
to get the output in English.
What's the output of
uname -a
localectl
Similar issue: https://bbs.archlinux.org/viewtopic.php?id=191771 , also en_IN.utf8 locale.
Offline
Thanks Karol, using your first command I can get desired output.
$ LC_ALL=C vnstat
Database updated: Wed Jul 22 21:52:25 2015
enp2s0 since 07/02/15
rx: 50.88 GiB tx: 8.62 GiB total: 59.49 GiB
monthly
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
Jul '15 50.88 GiB | 8.62 GiB | 59.49 GiB | 263.62 kbit/s
------------------------+-------------+-------------+---------------
estimated 71.98 GiB | 12.19 GiB | 84.17 GiB |
daily
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
yesterday 75.51 MiB | 9.19 MiB | 84.69 MiB | 8.03 kbit/s
today 214.15 MiB | 14.08 MiB | 228.23 MiB | 23.74 kbit/s
------------------------+-------------+-------------+---------------
estimated 234 MiB | 15 MiB | 249 MiB |
You wanted some command outputs.
What's the output of
uname -a localectl
Following are the command outputs you required.
$ uname -a
Linux *hostname* 3.14.48-1-lts #1 SMP Fri Jul 10 21:13:20 CEST 2015 x86_64 GNU/Linux
$ localectl
System Locale: LANG=en_IN.UTF-8
VC Keymap: n/a
X11 Layout: n/a
EDIT:It is very tiresome job to always use LC_ALL=C before a command to get the desired output. I previously used Ubuntu and there was my locale perfectly configured so vnstat always gave desired output. So I think my locale in Arch Linux is not correctly configured. It will be very helpful if anyone can provide me a way to set correct locale. I will also mark this thread SOLVED after I get the same vnstat output without using LC_ALL=C.
Last edited by nlern (2015-07-22 16:54:45)
Offline
You can use an alias to type less.
Offline
@karol, I want to set the assignment LC_ALL=C globally.
Offline
Export it in bashrc.
Offline
Export it in bashrc.
Offline
Thanks Awebb and karol for giving helping me out to solving this problem. I am making an alias for the working command in my shell profile file. I am also marking this thread as solved.
Offline
Pages: 1