Bug 15724 - net_monitor does not display dates
Summary: net_monitor does not display dates
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Shlomi Fish
QA Contact:
URL:
Whiteboard: MGA5TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-17 17:50 CEST by Jude Ashvin Lobo Shenoy
Modified: 2016-06-13 07:40 CEST (History)
2 users (show)

See Also:
Source RPM: net_monitor
CVE:
Status comment:


Attachments
Network statistics shows no date. (540.94 KB, image/png)
2015-04-17 17:50 CEST, Jude Ashvin Lobo Shenoy
Details
vnstat (2.79 KB, image/png)
2016-01-09 08:45 CET, Jude Ashvin Lobo Shenoy
Details
Vnstat Seems ok (3.46 KB, image/png)
2016-01-11 08:39 CET, Jude Ashvin Lobo Shenoy
Details
Net Monitor shows dates now. (176.31 KB, image/png)
2016-06-13 06:48 CEST, Jude Ashvin Lobo Shenoy
Details
Net Monitor shows dates now. (167.86 KB, image/png)
2016-06-13 06:49 CEST, Jude Ashvin Lobo Shenoy
Details

Description Jude Ashvin Lobo Shenoy 2015-04-17 17:50:07 CEST
I have noticed recently that vnstat does not display the date when i select the daily traffic option.

To have a see of the problem first we have to click on the blue globe (network center) in the systray. The select the monitor button. Then when we have the network monitor box open, click on the long strip labelled "show detailed network statistics". When the network statistics box opens we select the daily traffic option. In the display for daily traffic the first column labeled day shows a inverted T and no date. This is a very helpful feature and should be flawless. I use it a lot. very helpful.
Comment 1 Jude Ashvin Lobo Shenoy 2015-04-17 17:50:53 CEST
Created attachment 6304 [details]
Network statistics shows no date.
Comment 2 Jude Ashvin Lobo Shenoy 2015-04-17 17:52:14 CEST
Earlier bug report for Vnstat is 15691.
Comment 3 David Walser 2015-04-17 20:18:58 CEST
Ashvin, the program you keep filing bugs for is called net_monitor.  vnstat is a command-line program.  net_monitor is the graphical program that displays statistics collected by vnstat.

Source RPM: (none) => net_monitor
Assignee: bugsquad => shlomif
Summary: Vnstat does not display dates. => net_monitor does not display dates

Comment 4 Jude Ashvin Lobo Shenoy 2015-04-18 03:08:25 CEST
Sorry david ....i mixed them up. Do you consider this a bug?
Comment 5 David Walser 2015-04-20 02:15:24 CEST
It looks like there's some funny symbol where there's supposed to be a date; it looks like a valid bug to me.
Comment 6 Jude Ashvin Lobo Shenoy 2015-04-20 03:36:37 CEST
Hi David....Indeed a bug :)
Comment 7 Shlomi Fish 2015-04-20 15:20:31 CEST
(In reply to Jude Ashvin  Lobo Shenoy from comment #6)
> Hi David....Indeed a bug :)

I can see the date fine here. :-(.
Comment 8 Shlomi Fish 2015-04-21 08:07:37 CEST
Marking as ASSIGNED.

Status: NEW => ASSIGNED

Samuel Verschelde 2015-06-06 02:23:56 CEST

Whiteboard: (none) => MGA5TOO

Thierry Vignaud 2016-01-06 10:23:33 CET

CC: (none) => thierry.vignaud, yves.brungard_mageia

Comment 9 papoteur 2016-01-08 08:17:35 CET
I will have a look
Comment 10 papoteur 2016-01-08 08:34:26 CET
@Jude
Can you check that the result is always buggy?
Also, in this case, can you attach the image generated with the command:
vnstati -d -o - -i enp1s0 > vnstat.png
Comment 11 papoteur 2016-01-08 08:35:20 CET
And please indicate what is you locale setting.
Comment 12 Jude Ashvin Lobo Shenoy 2016-01-09 08:45:42 CET
Created attachment 7327 [details]
vnstat
Comment 13 Jude Ashvin Lobo Shenoy 2016-01-09 08:47:35 CET
Hi there.....Attaching the output of the above command for you. locate is India and using US English.
Comment 14 papoteur 2016-01-09 13:40:28 CET
Hello,
Thanks for reporting.
The bug is thus in vnstati, which output is used in net_monitor.
If there is no solution in vnstati, we should replaced it :(
Today, I have no idea how to do it.
Comment 15 papoteur 2016-01-09 18:39:23 CET
@Jude
With your help in the other bug report, I activated vnstat.
But I can't reproduce your bug. :/
I get the days in my locale format, as for the command vnstat.
Can you give the output of:
vnstat -d -i enp1s0
and then
LC_ALL=C vnstati -d -o - -i enp1s0 > vnstat.png
LC_ALL=C vnstat -d -i enp1s0

One of the difference can be the locale settings. We can act on that.
Comment 16 Jude Ashvin Lobo Shenoy 2016-01-11 08:37:39 CET
[wolf@wolf ~]$ vnstat -d -i enp1s0

 enp1s0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
        �7CU�      1.34 GiB |   55.89 MiB |    1.40 GiB |  135.83 kbit/s
        �7CU�    258.87 MiB |   42.91 MiB |  301.78 MiB |   28.61 kbit/s
        �7CU�    132.84 MiB |   14.97 MiB |  147.81 MiB |   14.01 kbit/s
        �7CU�     56.75 MiB |    5.50 MiB |   62.25 MiB |    5.90 kbit/s
        �7CU�    238.46 MiB |   18.09 MiB |  256.55 MiB |   24.32 kbit/s
        �7CU�    152.42 MiB |   13.58 MiB |  166.00 MiB |   15.74 kbit/s
        �7CU�     51.82 MiB |    4.21 MiB |   56.03 MiB |    5.31 kbit/s
        �7CU�     69.41 MiB |    4.01 MiB |   73.42 MiB |   12.81 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated       127 MiB |       7 MiB |     134 MiB |

[wolf@wolf ~]$ LC_ALL=C vnstat -d -i enp1s0

 enp1s0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
      01/04/16      1.34 GiB |   55.89 MiB |    1.40 GiB |  135.83 kbit/s
      01/05/16    258.87 MiB |   42.91 MiB |  301.78 MiB |   28.61 kbit/s
      01/06/16    132.84 MiB |   14.97 MiB |  147.81 MiB |   14.01 kbit/s
      01/07/16     56.75 MiB |    5.50 MiB |   62.25 MiB |    5.90 kbit/s
      01/08/16    238.46 MiB |   18.09 MiB |  256.55 MiB |   24.32 kbit/s
      01/09/16    152.42 MiB |   13.58 MiB |  166.00 MiB |   15.74 kbit/s
      01/10/16     51.82 MiB |    4.21 MiB |   56.03 MiB |    5.31 kbit/s
      01/11/16     69.41 MiB |    4.01 MiB |   73.42 MiB |   12.81 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated       127 MiB |       7 MiB |     134 MiB |
[wolf@wolf ~]$ 

Hey papoteur now it looks ok :)....i hope
Comment 17 Jude Ashvin Lobo Shenoy 2016-01-11 08:39:17 CET
Created attachment 7337 [details]
Vnstat Seems ok
Comment 18 papoteur 2016-01-12 07:56:06 CET
@Jude
Can you give us the ouput of the command locale?
Is it a standard or a customized setting?
Comment 19 Jude Ashvin Lobo Shenoy 2016-01-12 09:57:21 CET
[wolf@wolf ~]$ locale
LANG=en_IN.UTF-8
LC_CTYPE="en_IN.UTF-8"
LC_NUMERIC="en_IN.UTF-8"
LC_TIME="en_IN.UTF-8"
LC_COLLATE="en_IN.UTF-8"
LC_MONETARY="en_IN.UTF-8"
LC_MESSAGES="en_IN.UTF-8"
LC_PAPER="en_IN.UTF-8"
LC_NAME="en_IN.UTF-8"
LC_ADDRESS="en_IN.UTF-8"
LC_TELEPHONE="en_IN.UTF-8"
LC_MEASUREMENT="en_IN.UTF-8"
LC_IDENTIFICATION="en_IN.UTF-8"
LC_ALL=
Comment 20 papoteur 2016-01-12 22:37:17 CET
@Jude
Your setting seems fine. Thus I think there is something buggy in locales. Did you see other malfunction elsewhere?
You can also try with the prefix LC_TIME=C.
Comment 21 Jude Ashvin Lobo Shenoy 2016-01-13 09:16:22 CET
Well to be frank i have not found out any malfunction now apart from what was reported in the form of bur reports. Am constantly on the watch out for bugs. 
[wolf@wolf ~]$ LC_TIME=C locale
LANG=en_IN.UTF-8
LC_CTYPE="en_IN.UTF-8"
LC_NUMERIC="en_IN.UTF-8"
LC_TIME=C
LC_COLLATE="en_IN.UTF-8"
LC_MONETARY="en_IN.UTF-8"
LC_MESSAGES="en_IN.UTF-8"
LC_PAPER="en_IN.UTF-8"
LC_NAME="en_IN.UTF-8"
LC_ADDRESS="en_IN.UTF-8"
LC_TELEPHONE="en_IN.UTF-8"
LC_MEASUREMENT="en_IN.UTF-8"
LC_IDENTIFICATION="en_IN.UTF-8"
LC_ALL=
[wolf@wolf ~]$
Comment 22 papoteur 2016-01-13 13:56:48 CET
Hello,
Sorry, I wasn't enough clear.
I propose that you give the result of:
LC_TIME=C vnstat -d -i enp1s0
I look for the parameter that has effect on the format of the date in vnstat output.
This one could be used eventually in net_monitor if there is no side effect.
Or apply corrections on IN locale management.
Comment 23 Jude Ashvin Lobo Shenoy 2016-01-13 16:56:46 CET
Hi there....no probs cos i was busy too. Here's what you need from me :) and its impressive

[wolf@wolf ~]$ LC_TIME=C vnstat -d -i enp1s0

 enp1s0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
      01/04/16      1.34 GiB |   55.89 MiB |    1.40 GiB |  135.83 kbit/s
      01/05/16    258.87 MiB |   42.91 MiB |  301.78 MiB |   28.61 kbit/s
      01/06/16    132.84 MiB |   14.97 MiB |  147.81 MiB |   14.01 kbit/s
      01/07/16     56.75 MiB |    5.50 MiB |   62.25 MiB |    5.90 kbit/s
      01/08/16    238.46 MiB |   18.09 MiB |  256.55 MiB |   24.32 kbit/s
      01/09/16    152.42 MiB |   13.58 MiB |  166.00 MiB |   15.74 kbit/s
      01/10/16     51.82 MiB |    4.21 MiB |   56.03 MiB |    5.31 kbit/s
      01/11/16    296.46 MiB |   16.78 MiB |  313.24 MiB |   29.70 kbit/s
      01/12/16    112.99 MiB |    6.06 MiB |  119.05 MiB |   11.29 kbit/s
      01/13/16     51.52 MiB |    3.94 MiB |   55.46 MiB |    5.91 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        57 MiB |       3 MiB |      60 MiB
Comment 24 papoteur 2016-01-13 23:07:55 CET
I think that the problem is not vnstat, but the locale function.
It seems that glibc provides it.
One test: compare
date '+%x'
with and without prefix LC_TIME=C
I suppose you will get the same problem.
Comment 25 Jude Ashvin Lobo Shenoy 2016-01-14 10:29:59 CET
[wolf@wolf ~]$ date '+%x'
Thursday 14 January 2016
[wolf@wolf ~]$ LC_TIME=C
[wolf@wolf ~]$ LC_TIME=C date '+%x'
01/14/16
[wolf@wolf ~]$
Comment 26 papoteur 2016-01-16 20:09:08 CET
There a config file for vnstat
/etc/vnstat.conf
Inside, I have :
DayFormat    "%x"
MonthFormat  "%b '%y"
TopFormat    "%x"

Have you the same?
If not, can you give the result of:
date '+%aa'
where %aa is to replace with the parameter on line "DayFormat" between quotes?

You can also replace it in /etc/vnstat.conf with %D or %F, or something like %d/%m/%yy to specify the format, without local interference.
Comment 27 Jude Ashvin Lobo Shenoy 2016-01-17 13:28:58 CET
Yes /etc/vnstat.conf file exists but am a bit confused how and where to make the changes as directed by you. Results of the date command are as follows:
[wolf@wolf ~]$ date '+%x'
Sunday 17 January 2016
[wolf@wolf ~]$
Comment 28 papoteur 2016-01-17 17:48:00 CET
In vnstat.conf, replace

DayFormat    "%x"
with
DayFormat    "%D"
or 
DayFormat    "%F"
or
DayFormat    "%d/%m/%yy"
until the result is OK
Comment 29 Jude Ashvin Lobo Shenoy 2016-01-20 06:02:52 CET
I did as told but the display on vnstat is the same as before :(
Comment 30 Jude Ashvin Lobo Shenoy 2016-06-13 06:47:28 CEST
I guess this is resolved now as i see dates.
Comment 31 Jude Ashvin Lobo Shenoy 2016-06-13 06:48:19 CEST
Created attachment 7983 [details]
Net Monitor shows dates now.
Comment 32 Jude Ashvin Lobo Shenoy 2016-06-13 06:49:53 CEST
Created attachment 7984 [details]
Net Monitor shows dates now.
Comment 33 papoteur 2016-06-13 07:40:32 CEST
Thus closing

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.