Page 1 of 1

Assistance gathering data on PiNet sessions

Posted: Wed May 22, 2019 7:58 pm
by cgrandinets
Hello,

I am looking for some assistance with a request I've received. I am running a PiNet server with ~10 Raspberry Pi fat clients connecting to it. I need two things:

1. The total number of logins/sessions opened to the PiNet server in the last 30 days
2. The time that those sessions remained logged in for

From what I can tell, there is no vanilla way to achieve this, I am running Ubuntu 16.04 as the PiNet Server. So, are there any PiNet or LTSP addons that will allow me to gather data like that? Or possibly a way to pull it from the log files?

Thank you.

Re: Assistance gathering data on PiNet sessions

Posted: Fri May 24, 2019 6:21 pm
by Gbaman
cgrandinets wrote:
Wed May 22, 2019 7:58 pm
Hello,

I am looking for some assistance with a request I've received. I am running a PiNet server with ~10 Raspberry Pi fat clients connecting to it. I need two things:

1. The total number of logins/sessions opened to the PiNet server in the last 30 days
2. The time that those sessions remained logged in for

From what I can tell, there is no vanilla way to achieve this, I am running Ubuntu 16.04 as the PiNet Server. So, are there any PiNet or LTSP addons that will allow me to gather data like that? Or possibly a way to pull it from the log files?

Thank you.
So this is an interesting one, not one I have had before (and I have had a heck of a lot of odd requests for PiNet).
I am not aware of any way with LTSP and can confirm PiNet doesn't include anything for this, especially given there is no real use case I am aware of for this in a classroom setup.

Without being in front of a PiNet server currently, one potential way you could look at is the /var/log/auth.log file, as each login to a PiNet client kicks off a SSH connection to the main server.
You could probably also take a look at the last command, as it allows you to see login history data.

Perhaps someone else with a little more expertise in general bash filtering etc could help with this, the key is there is nothing special around how PiNet clients log in, it is simply an SSH connection to the main server.

Re: Assistance gathering data on PiNet sessions

Posted: Thu Jun 06, 2019 2:51 am
by ejolson
Gbaman wrote:
Fri May 24, 2019 6:21 pm
cgrandinets wrote:
Wed May 22, 2019 7:58 pm
Hello,

I am looking for some assistance with a request I've received. I am running a PiNet server with ~10 Raspberry Pi fat clients connecting to it. I need two things:

1. The total number of logins/sessions opened to the PiNet server in the last 30 days
2. The time that those sessions remained logged in for

From what I can tell, there is no vanilla way to achieve this, I am running Ubuntu 16.04 as the PiNet Server. So, are there any PiNet or LTSP addons that will allow me to gather data like that? Or possibly a way to pull it from the log files?

Thank you.
So this is an interesting one, not one I have had before (and I have had a heck of a lot of odd requests for PiNet).
I am not aware of any way with LTSP and can confirm PiNet doesn't include anything for this, especially given there is no real use case I am aware of for this in a classroom setup.

Without being in front of a PiNet server currently, one potential way you could look at is the /var/log/auth.log file, as each login to a PiNet client kicks off a SSH connection to the main server.
You could probably also take a look at the last command, as it allows you to see login history data.

Perhaps someone else with a little more expertise in general bash filtering etc could help with this, the key is there is nothing special around how PiNet clients log in, it is simply an SSH connection to the main server.
Is there any progress on creating a report detailing login and logout times as well as total system usage per user? It seems like a reasonable kind of report to generate, not only to asses individual student effort but to show to administrative types how much total use the system is getting.

There is a post here

viewtopic.php?f=36&t=241961

on PiNet that has been languishing for about a month. Is the project being actively maintained, or is PiServer a better approach these days?