1

Ever since I have used vnstat and vnstati, not a single time have I received a proper date under the day column for vnstat. Also, vnstati screenshots display unprintable characters. Please help me solve this problem.

Screenshots:

1:vnstat

2:vnstati

Thank you

vishal-wadhwa
  • 167
  • 1
  • 1
  • 8
  • What output do you get with the `date` command? – heynnema Nov 02 '16 at 14:36
  • @heynnema I get the date correctly: Output: Wed Nov 2 20:19:41 IST 2016 – vishal-wadhwa Nov 02 '16 at 14:49
  • Look at /etc/vnstat.conf and you'll find formatting detail there. Otherwise, use Synaptic to do a "complete removal" and reinstall vnstat. Report back. – heynnema Nov 02 '16 at 15:01
  • @heynnema thanks for replying. Here's what I did: 1. Looked at /etc/vnstat.conf , date format was %x 2. Reinstalled vnstat using dpkg (purge). 3. Removed vnstat using synaptic as you recommended, restarted the system and installed vnstat using synaptic again. But all this to no good. Problem still exists. – vishal-wadhwa Nov 02 '16 at 16:02
  • 1
    In terminal preferences/encodings do you have UTF-8 selected? Do you have any other languages installed? Check "Language Support" in System Settings. – heynnema Nov 02 '16 at 16:18
  • I checked terminal encoding using [this](http://stackoverflow.com/questions/5306153/how-to-get-terminals-character-encoding). It was set to en_IN. I changed it to "en_IN.utf8". Under language support I have English, English(US) and English(India)(regional language). Still no good. – vishal-wadhwa Nov 02 '16 at 16:35
  • How does it look in the Terminal app preference/encoding tab? – heynnema Nov 02 '16 at 16:58
  • I went to Language Support and changed my regional formats to English (US) and then apply system wide. And the problem is solved now. I guess there is some problem in ubuntu language pack for my region. Anyway, thank you so much for helping @heynnema. – vishal-wadhwa Nov 02 '16 at 17:49
  • Great news! I added our conversation as an answer. Please vote/accept it if our conversation was helpful. – heynnema Nov 02 '16 at 18:15

1 Answers1

2

After a brief conversation in the comments...

  1. we checked the output of the date command
  2. we checked the date format configuration in the /etc/vnstat.conf file
  3. we checked the Terminal app preferences in the encoding tab
  4. we checked the language settings in System Settings/Language Support

It was found that by setting the Language Support regional format (from India) to English (US) and applying it system wide, fixed the problem with vnstat displaying odd characters in the date field.

A log out may be necessary for the changes to take effect. :)

vishal-wadhwa
  • 167
  • 1
  • 1
  • 8
heynnema
  • 68,647
  • 15
  • 124
  • 180