Was ist eine Debian-Nutzersitzung (»user session«)?
Ich habe den Verdacht, daß verschiedene Leute diese Frage unterschiedlich beantworten.
en.wikipedia.org hat 2017-01 keinen Artikel »user session«, erwähnt den Begriff aber in mehreren Artikeln im Text.
zgrep ermittelt, daß die Manpages von Debian-8.6 den Begriff »user session« 49 Mal verwenden.
Code: Alles auswählen
$man 8 pam_systemd
Wie definiert systemd also eine Nutzersitzung?pam_systemd - Register user sessions in the systemd login manager.
Und ist diese Definition für alle Debian-Anwendungsfälle gültig?
http://wiki.debian.org/de/Orca schreibt:
IBM:Installation und Konfiguration von ORCA auf einem üblichen Debiansystem:'~$ sudo aptitude install gnome-orca'. Tippen Sie als Benutzer '~$ orca -t', Beantworten Sie alle Fragen. Orca startet dann automatisch beim Start der »Nutzersitzung«/»USER SESSION«
<jim>:user session: any APPC session other than a SNASVCMG session.
http://superuser.com/questions/651111/w ... n-in-linux <Ulkoma>:it's probably the process spawned by login. Which is the shell you get when you log in (or does it spawn passwd which spawns the login shell, I forget)
<terdon> 27 Sep 2013 at 15:39:What is the definition of a “session” in linux?
When I run the "w" command, I see two users logged in (both are me). A quick search here tells that this is normal because "A single user can have multiple active sessions at any one time."
What is a session? Why do I have two of them when I've only logged into my system once?
<Luigi>:Session usually refers to shell sessions. A shell is what allows you to interact with the computer. It acts as a bridge between the user and the kernel. Whenever you run a command, it is the shell that captures your intent and tells the kernel to do its thing.
In most Linux flavors, the default shell is bash and a new bash session will be launched every time you open a new terminal. In the output of w you posted, you seem to have your graphical login session (looks like you're sshing o the machine):
argento :0 18set13 ?xdm? 2days 1.58s gdm-session-worker [pam/gdm-password]
A few open terminal emulators:
argento pts/0 18set13 29:26m 5:26 5:26 rdesktop -g 1200x700 -u administrator -p XXXXXXXXX -d DOMAIN -K srv-wsus
argento pts/1 18set13 9days 0.16s 0.16s /bin/bash
argento pts/2 lun10 5.00s 0.09s 7.55s /usr/bin/python /usr/bin/terminator
argento pts/3 14:40 33:41 0.09s 0.03s vim notes.txt
argento pts/4 gio12 26:04m 0.10s 7.55s /usr/bin/python /usr/bin/terminator
argento pts/5 14:56 17:33 0.11s 0.11s /bin/bash
And you also seem to have logged in from a non-graphical tty:
argento tty2 15:11 1:01 0.09s 0.09s -bash
Each of these is a separate instance of your shell and each counts as its own session.
I think that every terminal session is a user session. You can have more than one terminal under X and those are virtual terminals, or you can have a real terminal under a console. Those are all sessions. This is my 'w' output:
Code: Alles auswählen
$ w
<Vid Plavsic>:15:14:13 up 9 days, 6:02, 8 users, load average: 1,03, 1,19, 1,31
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
argento :0 18set13 ?xdm? 2days 1.58s gdm-session-worker [pam/gdm-password]
18set13 ?xdm? 2days 1.58s gdm-session-worker [pam/gdm-password]
argento pts/0 18set13 29:26m 5:26 5:26 rdesktop -g 1200x700 -u administrator -p XXXXXXXXX -d DOMAIN -K srv-wsus
argento pts/1 18set13 9days 0.16s 0.16s /bin/bash
argento pts/2 lun10 5.00s 0.09s 7.55s /usr/bin/python /usr/bin/terminator
argento pts/3 14:40 33:41 0.09s 0.03s vim notes.txt
argento pts/4 gio12 26:04m 0.10s 7.55s /usr/bin/python /usr/bin/terminator
argento pts/5 14:56 17:33 0.11s 0.11s /bin/bash
argento tty2 15:11 1:01 0.09s 0.09s -bash
The second column show the tty. As you can see pts's are xterm (virtual terminal), and the other (tty2) is a console login.
https://blog.modeanalytics.com/finding- ... sions-sql/ (abgerufen 2017-02-16): Finding User Sessions with SQL | March 20, 2015 | Benn Stancil — Chief Analyst at Mode schreibt:A session is each terminal shell run by the processes of a user. For an example, I have 3 sessions running right now. My Mate desktop enviroment, and my two terminal windows.
A lot of product questions are based on the idea of a user “session.” What do users do when they first log in? In what order do users take specific actions? How long do people use your site in an average sitting? Does activity vary by device?
A number of analytics tools define user sessions automatically. But, default definitions may not be appropriate for your unique product or, even if they are, there will be times you’ll want to define sessions using your raw event data. This can seem daunting—but it doesn’t need to be.
What’s a User Session?
A user session is a period of uninterrupted activity on a website or app. If a user opens Facebook, clicks around the timeline, looks at a few pictures, and then closes Facebook, that would be one session.
This definition, however, is imprecise. What exactly is a user? What constitutes activity? What does uninterrupted mean?
Depending on what you’re analyzing, these questions have different answers. Facebook might define a user as someone who’s logged in, while the New York Times considers everyone looking at a page. Activity on YouTube likely includes the time a video is playing, but Amazon might require people to click on things to be considered active. And while Netflix might allow long breaks in activity and still consider it uninterrupted—pausing a movie to go to the bathroom probably shouldn’t start a new session—Snapchat might break up sessions if someone stops using the app for just a couple minutes.
Moreover, even within a single product, these definitions can change depending on the question you’re trying to answer. Facebook’s Messenger app is likely opened and closed repeatedly during conversations. In some cases, Facebook might want to consider the back-and-forth during a single conversation as one session, regardless of how many times the app was opened or closed. In other cases, they might want to end the session when the app is closed and start a new one every time it’s opened.
Unfortunately, most tools that automatically define user sessions provide default answers to these questions. Google Analytics, for example, automatically makes assumptions about what user activity is, and how much time must pass between activities to constitute new sessions.
Because your product may not fit within these defaults—or only fits sometimes—it can be useful to define sessions manually. While it might seem complicated, it’s actually straightforward to define custom sessions when working with raw data.