is possible know how many sessions of cpanel is opened just NOW?? (sessions active/live)

000

Well-Known Member
Jun 3, 2008
446
20
68
hello,

some command to know how many SESSIONS is running/opened just INT THIS MOMENT?

why?

if by example ACCOUNTA open session cPanel from CHILE
+ ACCOUNTB open session from SPAIN
+ ACCOUNTC open session from USA

then "commandX" display "3 sessions openneds from IP1, IP2, IP3"

...
exist some command to get that report?

and more:

what if USERA open session from CHILE and same USERA open session from VENEZUELA ??

Then "commandX" will show 2 sessions openned to USERA

...


any help is welcome.

Thanks
 

000

Well-Known Member
Jun 3, 2008
446
20
68
Session files are stored in
/var/cpanel/sessions/raw/

Each file contains information such as the IP address.
Thanks master ZenHostingTravis logically I am no't expert in SHELL or admin servers.
Can you please giveme a command to run from PUTTY and I get output similar to:
Code:
current sessions oppeneds: 13
order                    moment                         IP            USER                APP

first                from 2 hours                        x                sam                cPanel
second            from 50 minutes                       y                sem                WHM
third                from 9 minutes                    z                sim                WebMail
.
.
.
I know this is very ambitiouse, but I say something similar :-D

Many thanks
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,027
313
cPanel Access Level
Root Administrator
@000 - it may be as simple as this:

Code:
ls -lah /var/cpanel/sessions/raw
That will give you output that looks similar to the following:

Code:
drwx------ 2 root root 65536 Dec  3 09:12 ./
drwx------ 5 root root  4096 Dec  3 09:27 ../
-rw------- 1 root root   566 Dec  3 08:50 user1:Zgf3qL6YfXzWCdTb
-rw------- 1 root root   456 Dec  3 08:50 user2:Tys_z_zwaVA8JaHd
with the username and timestamp listed.
 

000

Well-Known Member
Jun 3, 2008
446
20
68
@000 - it may be as simple as this:

Code:
ls -lah /var/cpanel/sessions/raw
That will give you output that looks similar to the following:

Code:
drwx------ 2 root root 65536 Dec  3 09:12 ./
drwx------ 5 root root  4096 Dec  3 09:27 ../
-rw------- 1 root root   566 Dec  3 08:50 user1:Zgf3qL6YfXzWCdTb
-rw------- 1 root root   456 Dec  3 08:50 user2:Tys_z_zwaVA8JaHd
with the username and timestamp listed.
Run perfect master cPRex.

I need that info to choice the best moment when I restart server and do some updates...

not is possible include IP in output?