Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #159453 > unrolled thread

How to run 'vnstat' as user?

Started bySharon Kimble <boudiccas@skimble.plus.com>
First post2015-10-19 16:20 +0200
Last post2015-10-23 19:30 +0200
Articles 8 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  How to run 'vnstat' as user? Sharon Kimble <boudiccas@skimble.plus.com> - 2015-10-19 16:20 +0200
    Re: How to run 'vnstat' as user? <tomas@tuxteam.de> - 2015-10-19 18:50 +0200
      Re: How to run 'vnstat' as user? Sharon Kimble <boudiccas@skimble.plus.com> - 2015-10-19 19:20 +0200
        Re: How to run 'vnstat' as user? <tomas@tuxteam.de> - 2015-10-19 22:40 +0200
          Re: How to run 'vnstat' as user? Sharon Kimble <boudiccas@skimble.plus.com> - 2015-10-20 12:50 +0200
            Re: How to run 'vnstat' as user? <tomas@tuxteam.de> - 2015-10-20 15:00 +0200
              Re: How to run 'vnstat' as user? tomas@tuxteam.de - 2015-10-21 18:30 +0200
                Solved [was Re: How to run 'vnstat' as user?] Sharon Kimble <boudiccas@skimble.plus.com> - 2015-10-23 19:30 +0200

#159453 — How to run 'vnstat' as user?

FromSharon Kimble <boudiccas@skimble.plus.com>
Date2015-10-19 16:20 +0200
SubjectHow to run 'vnstat' as user?
Message-ID<qljs6-6P9-19@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I'm having great difficulty in getting vnstat to run as user, like I had
on my previous i386 computer. I have created the new 64bit eth0 binary
file in ~/cron/lib/ so that it is backed up with my regular backups with
obnam. Except it seems that only root or vnstat can run and own the
~/cron/lib/eth0, which is then unable to be backed up with obnam because
its only a user backup and not root.

How then can I run vnstat as a user please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.1

[toc] | [next] | [standalone]


#159461

From<tomas@tuxteam.de>
Date2015-10-19 18:50 +0200
Message-ID<qllNf-1H5-3@gated-at.bofh.it>
In reply to#159453
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Oct 19, 2015 at 03:09:29PM +0100, Sharon Kimble wrote:
> I'm having great difficulty in getting vnstat to run as user, like I had
> on my previous i386 computer. I have created the new 64bit eth0 binary
> file in ~/cron/lib/ so that it is backed up with my regular backups with
> obnam. Except it seems that only root or vnstat can run and own the
> ~/cron/lib/eth0, which is then unable to be backed up with obnam because
> its only a user backup and not root.
> 
> How then can I run vnstat as a user please?

Hmm. Trying to understand: you are trying to run vmstat from cron?
Does it work when you run it from the command linee?

regards
- - tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlYlFVMACgkQBcgs9XrR2kaacACfS1VlVDlraqq9dgUipMDrWvLv
5cMAn2ayfLIEKQ42eWTdRK9Y0lXJwvPK
=KMZ/
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#159466

FromSharon Kimble <boudiccas@skimble.plus.com>
Date2015-10-19 19:20 +0200
Message-ID<qlmgi-2vV-11@gated-at.bofh.it>
In reply to#159461

[Multipart message — attachments visible in raw view] — view raw

<tomas@tuxteam.de> writes:

> On Mon, Oct 19, 2015 at 03:09:29PM +0100, Sharon Kimble wrote:
>> I'm having great difficulty in getting vnstat to run as user, like I had
>> on my previous i386 computer. I have created the new 64bit eth0 binary
>> file in ~/cron/lib/ so that it is backed up with my regular backups with
>> obnam. Except it seems that only root or vnstat can run and own the
>> ~/cron/lib/eth0, which is then unable to be backed up with obnam because
>> its only a user backup and not root.
>> 
>> How then can I run vnstat as a user please?
>
> Hmm. Trying to understand: you are trying to run vmstat from cron?
> Does it work when you run it from the command linee?
>

No, I only store the "eth0" in a subdirectory of my cron directory. I am
trying to start it as user on the command-line.

Thanks
Sharon
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3

[toc] | [prev] | [next] | [standalone]


#159478

From<tomas@tuxteam.de>
Date2015-10-19 22:40 +0200
Message-ID<qlpnQ-76h-9@gated-at.bofh.it>
In reply to#159466
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Oct 19, 2015 at 06:09:41PM +0100, Sharon Kimble wrote:
> <tomas@tuxteam.de> writes:
> 
> > On Mon, Oct 19, 2015 at 03:09:29PM +0100, Sharon Kimble wrote:
> >> I'm having great difficulty in getting vnstat to run as user, like I had
> >> on my previous i386 computer [...]

> > Hmm. Trying to understand: you are trying to run vmstat from cron?
> > Does it work when you run it from the command linee?
> >
> 
> No, I only store the "eth0" in a subdirectory of my cron directory. I am
> trying to start it as user on the command-line.

Still confused here. What's the content of this "eth0" file?

regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlYlSyIACgkQBcgs9XrR2kYSggCeKSyYjIu9JTk8CE4QT0/Uz4/V
yCgAn0FkBT19hZeMn0rlx37VGPR4C8IT
=vGNK
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#159526

FromSharon Kimble <boudiccas@skimble.plus.com>
Date2015-10-20 12:50 +0200
Message-ID<qlCEp-1fd-1@gated-at.bofh.it>
In reply to#159478

[Multipart message — attachments visible in raw view] — view raw

<tomas@tuxteam.de> writes:

> On Mon, Oct 19, 2015 at 06:09:41PM +0100, Sharon Kimble wrote:
>> <tomas@tuxteam.de> writes:
>> 
>> > On Mon, Oct 19, 2015 at 03:09:29PM +0100, Sharon Kimble wrote:
>> >> I'm having great difficulty in getting vnstat to run as user, like I had
>> >> on my previous i386 computer [...]
>
>> > Hmm. Trying to understand: you are trying to run vmstat from cron?
>> > Does it work when you run it from the command linee?
>> >
>> 
>> No, I only store the "eth0" in a subdirectory of my cron directory. I am
>> trying to start it as user on the command-line.
>
> Still confused here. What's the content of this "eth0" file?
>
Its a binary file produced by running "vnstat -u -i eth0" and is the
'database' for vnstat, containing all the historical info that can be
outputted when you run the command "vnstat".

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3

[toc] | [prev] | [next] | [standalone]


#159528

From<tomas@tuxteam.de>
Date2015-10-20 15:00 +0200
Message-ID<qlEGf-4bA-27@gated-at.bofh.it>
In reply to#159526
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Oct 20, 2015 at 11:44:41AM +0100, Sharon Kimble wrote:
> <tomas@tuxteam.de> writes:

[...]

> > Still confused here. What's the content of this "eth0" file?
> >
> Its a binary file produced by running "vnstat -u -i eth0" and is the
> 'database' for vnstat, containing all the historical info that can be
> outputted when you run the command "vnstat".

Thanks, I thing I got it now. I'll test around a bit, but it'll take me
some time.

I'll get back to you when I come around to it.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlYmMVcACgkQBcgs9XrR2kbjzQCdHtj9QfWcNTuIKe544rb0Q/Kv
MCkAn3OAvzlfxicGo7FfF0qqhHvd0z9c
=C8FN
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#159586

Fromtomas@tuxteam.de
Date2015-10-21 18:30 +0200
Message-ID<qm4r2-8qy-37@gated-at.bofh.it>
In reply to#159528
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Oct 20, 2015 at 02:19:35PM +0200, tomas@tuxteam.de wrote:
> On Tue, Oct 20, 2015 at 11:44:41AM +0100, Sharon Kimble wrote:
> > <tomas@tuxteam.de> writes:
> 
> [...]
> 
> > > Still confused here. What's the content of this "eth0" file?
> > >
> > Its a binary file produced by running "vnstat -u -i eth0" and is the
> > 'database' for vnstat, containing all the historical info that can be
> > outputted when you run the command "vnstat".
> 
> Thanks, I thing I got it now. I'll test around a bit, but it'll take me
> some time.
> 
> I'll get back to you when I come around to it.

OK. Let's get first the obvious things out of the way:

 - what are the file permissions of this ~/cron/lib/eth0 file? What does
   (as the "normal" user) ls -l ~/cron/lib/eth0 say?

 - you can try to run vnstat under strace like so:

     strace -o your.trace.file <your vnstat command>

   after this, your.trace.file will contain a log of all system calls
   done by vnstat. The failing system call should be localizable near
   the end of that log (do post the last ~50-ish lines if in doubt)

HTH
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlYns1QACgkQBcgs9XrR2kbUGgCZATq7ZJkoG7R9LbCLXhySTann
ZOYAnRo0a3OOcY8Nt90Ovue9L9dEhmqW
=eemQ
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#159690 — Solved [was Re: How to run 'vnstat' as user?]

FromSharon Kimble <boudiccas@skimble.plus.com>
Date2015-10-23 19:30 +0200
SubjectSolved [was Re: How to run 'vnstat' as user?]
Message-ID<qmOka-84O-5@gated-at.bofh.it>
In reply to#159586

[Multipart message — attachments visible in raw view] — view raw

tomas@tuxteam.de writes:

> On Tue, Oct 20, 2015 at 02:19:35PM +0200, tomas@tuxteam.de wrote:
>> On Tue, Oct 20, 2015 at 11:44:41AM +0100, Sharon Kimble wrote:
>> > <tomas@tuxteam.de> writes:
>> 
>> [...]
>> 
>> > > Still confused here. What's the content of this "eth0" file?
>> > >
>> > Its a binary file produced by running "vnstat -u -i eth0" and is the
>> > 'database' for vnstat, containing all the historical info that can be
>> > outputted when you run the command "vnstat".
>> 
>> Thanks, I thing I got it now. I'll test around a bit, but it'll take me
>> some time.
>> 
>> I'll get back to you when I come around to it.
>
> OK. Let's get first the obvious things out of the way:
>
>  - what are the file permissions of this ~/cron/lib/eth0 file? What does
>    (as the "normal" user) ls -l ~/cron/lib/eth0 say?
>
>  - you can try to run vnstat under strace like so:
>
>      strace -o your.trace.file <your vnstat command>
>
>    after this, your.trace.file will contain a log of all system calls
>    done by vnstat. The failing system call should be localizable near
>    the end of that log (do post the last ~50-ish lines if in doubt)
>
The case has been resolved, and vnstat is now working nicely as user.
The solution is to remove the debian version of vnstat, and download the
programme from its home page, which from memory is version 1.14,
whereas debians version is 1.12. Following the instructions in the
downloaded programme it is very easy to set it up to just run as user,
rather than system-wide that the debian package uses. 

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web