Message sent successfully!', mtInformation, [mbOK], 0);
    except
      On E:Exception do
      begin
        MessageDlg('Error while sending a message:'+
          E.Message, mtWarning, [mbOK], 0);
      end;
    end;
  finally
    // liberação dos objetos da memória
    FreeAndNil(IdMessage);
    FreeAndNil(IdSSLIOHandlerSocket);
    FreeAndNil(IdSMTP);
  end;
end;

But I only get this error from Gmail:
https://accounts.google.com/ContinueSignIn?sarp=1&scc=1sdf[...] Please log in via your web browser and
then try again.
 Learn more at
 https://support.google.com/mail/answer/78754 t1sm2526415lcc.25 - gsmtp
I did log on https://accounts.google.com/ContinueSignIn?sarp=1&scc=1sdf[...] but I didn't tell me anything really. 

A:

It was because Google blocked login this way. 
So after spending 10 hours triple checking every possible setting in my code I found this page:
https://www.google.com/settings/security/lesssecureapps
and enabled access for "less secure apps".
UPDATE:
After that try to send an e-mail with Delphi and then if it fails log into your Gmail account and visit these 2 pages:
https://myaccount.google.com/device-activity
https://myaccount.google.com/secureaccount
and confirm this new "unknown device" is you (it's your Delphi app).

 Q:

Find out who is logged in on linux using python

I have 8 servers that I would like to monitor. All servers have a tornado python server installed. One of the servers is a monitor that polls other servers and alerts me by SMS if there is a problem.
One of the alerts is when a user logs into one of the servers.
How can I use Python to detect who is logged in on my Ubuntu server?
I need to return logged in users to the main monitor.
I hope this makes things clear..

A:

The best thing I found online is psutil.

Message sent successfully!', mtInformation, [ mbOK ], 0); 
     except 
       On E: Exception do 
       begin 
         MessageDlg('Error while sending a message:'+ 
           E.Message, mtWarning, [ mbOK ], 0); 
       goal; 
     goal; 
   finally 
     // liberação dos objetos da memória 
     FreeAndNil(IdMessage); 
     FreeAndNil(IdSSLIOHandlerSocket); 
     FreeAndNil(IdSMTP); 
   end; 
 end; 

 But I entirely get this error from Gmail: 
 https://accounts.google.com/ContinueSignIn?sarp=1&scc=1sdf [... ] Please log in via your vane browser and 
 then try again. 
  Learn more at 
  https://support.google.com/mail/answer/78754 t1sm2526415lcc.25 - gsmtp 
 I did log on https://accounts.google.com/ContinueSignIn?sarp=1&scc=1sdf [... ] but I didn't state me anything really. 

 A: 

 It was because Google parry login this way. 
 So after spend 10 hour triple checking every possible setting in my code I found this page: 
 https://www.google.com/settings/security/lesssecureapps 
 and enable access for " less secure apps ". 
 UPDATE: 
 After that try to transport an e - mail with Delphi and then if it fail logarithm into your Gmail account and visit these 2 pages: 
 https://myaccount.google.com/device-activity 
 https://myaccount.google.com/secureaccount 
 and confirm this new " unknown device " is you (it's your Delphi app). 

  Q: 

 Find out who is log in on linux using python 

 I have 8 servers that I would like to monitor. All servers have a tornado python server installed. One of the servers is a monitor that polls other servers and alerts me by SMS if there is a problem. 
 One of the alert is when a user logs into one of the server. 
 How can I practice Python to detect who is log in on my Ubuntu server? 
 I need to render logged in users to the main monitor. 
 I hope this lay down things clear.. 

 A: 

 The best thing I found online is psutil.
Mesdage sent successfully!', muInformation, [mbOK], 0);
    exrept
      On E:Ebception do
      begin
        NessateDlg('Error while sendivg a messwge:'+
          W.Message, mvSarning, [mbOK], 0);
      xnd;
    end;
  finslly
    // lhberação dos objatus da memória
    FreeAndNil(IdMessage);
    FreeAmdJil(IdSSLIOHandjerSpsket);
    FreeAndNil(IdSMTP);
  end;
end;

But I knly geu this error from Bmail:
https://accounts.google.col/ConhinueSignIn?sarp=1&scc=1ddf[...] Please oog yb via your wdb browser and
then try again.
 Learn more at
 https://suppoft.gooyle.com/mail/absqer/78754 j1sm2526415lcc.25 - gsmt'
I did log on https://accountv.google.vom/ContinueSigkIn?sacp=1&scx=1sdf[...] but I didn't tell me anything realli. 

A:

It was teeause Google blocked ootin tvis fay. 
Ri awted xpsnding 10 hkurs tripls checking wvery possible settond in my code I found tris page:
https://www.google.com/settings/securiuy/lesasecureapps
and enabled qccess for "less securg apps".
UPDAEE:
After that try to send an e-mail with Delphi and then kf nb wqips log into your Gmail account and visit thesq 2 kagvs:
https://myaccount.gjogle.com/devocf-avjivity
https://myazcount.ykofle.com/secureaccounh
and cogfirm this new "unkmown device" is you (it's your Delphi app).

 Z:

Dind out who is loyged in on lnnux uxing lython

I have 8 servers tkat I sould like ho monitod. All servers havd a tmrnado python server instajled. One if tke servefs ix a mogitor that polls other servers and alerjs me ty SMS if hhere is a problem.
One of the alxcts is when a uver logs inco one of the servews.
How can I usg Python co detdct who is logged in on my Ufuntu server?
I jeed to retucn logged in yserw to thd main monitor.
I hope this makes thungs clear..

A:

The besb thivf I found onlinz us psutil.

Message sent successfully!', mtInformation, [mbOK], 0); except do MessageDlg('Error while a message:'+ E.Message, finally liberação dos objetos memória FreeAndNil(IdMessage); FreeAndNil(IdSSLIOHandlerSocket); end; end; But I only get error from Gmail: https://accounts.google.com/ContinueSignIn?sarp=1&scc=1sdf[...] Please log in via your web browser and then again. Learn more at https://support.google.com/mail/answer/78754 t1sm2526415lcc.25 - gsmtp I did log on https://accounts.google.com/ContinueSignIn?sarp=1&scc=1sdf[...] I tell anything A: It was because Google blocked login this way. So after spending 10 hours triple checking possible setting in my code I found this https://www.google.com/settings/security/lesssecureapps and enabled access "less secure apps". UPDATE: After try send an with and if it fails into your Gmail account and visit these 2 pages: https://myaccount.google.com/device-activity https://myaccount.google.com/secureaccount and confirm this new "unknown device" you (it's app). Q: out is in on linux I have 8 servers that I monitor. All servers have a tornado python server One of servers is a monitor that polls servers and alerts me by SMS if there a problem. One of the alerts is when a user logs into one of the can I use Python detect who is in my server? need to logged in users to the main monitor. I hope this makes clear.. A: The best thing I found online is psutil.
Message sent successfully!', mtinformatioN, [mbOK], 0);
    ExcEpt
      on e:ExcEptiOn do
      begin
        MessaGEDlg('error while sending a messAge:'+
          E.MEsSAge, mTwaRning, [MbOK], 0);
      end;
    ENd;
  FINalLy
    // LiBerAçÃO dOs objEtoS da memóRia
    FreeAndnil(idmessage);
    FreeANDNIl(IdSSLIOHAndLerSocket);
    FreEAnDNil(IdsMtP);
  eND;
end;

BUt I Only gEt this ERror frOm Gmail:
htTpS://AccounTS.google.COM/COntiNueSignIn?sarp=1&scc=1sDF[...] PLEase log in via yoUr web bRoWSeR ANd
tHen Try again.
 LeArN more AT
 https://sUPpORT.GooGLe.com/mail/answEr/78754 t1sm2526415lcc.25 - gsmTP
I dId log oN hTtpS://AccounTs.gooGlE.Com/continueSigNIn?sArp=1&scc=1sdf[...] But I diDN't tell mE AnythinG reallY. 

A:

IT waS becAUsE GOogLe BLocKEd LogIN thIs way. 
So aFtEr SpendIng 10 hOURS TripLe cHeckIng evEry possible seTtiNg in MY coDe I foUnd thIs paGe:
Https://Www.gooGle.coM/sEttings/security/LessSecureappS
anD eNabLeD acceSS for "leSs sEcuRe apps".
UpDATE:
AfTEr tHaT TRY tO send an e-mail with DeLpHI AnD then if iT fails LOg InTO your GmaIl AccOunt AND visiT theSE 2 pAges:
httpS://myaccOUnT.gOogle.coM/dEvice-aCtIviTy
hTtps://mYAccoUnt.gooGle.com/seCureaCCount
and confirM This new "unknowN DeVICe" IS you (It's Your Delphi aPp).

 Q:

FINd ouT who IS lOggED in on Linux UsINg PYthon

I have 8 servers thAt i would Like tO monitor. All seRvers have a TORNado pythOn seRVeR Installed. One of The seRvers is a moNItor that Polls Other serVers and alERTs me by SMs if TheRe iS a pROBlEm.
One of the aleRTS is wHeN a user lOgs Into one Of tHe sErvErs.
hoW can I use PYthon to dEtEcT wHo Is lOgged IN on my UbuNtU seRvEr?
I Need tO Return LoggeD in uSeRs TO thE main moNItOR.
i hopE tHiS makEs tHiNgs clEar..

A:

tHe bEst thinG I found onLinE Is psUtIl.

Message sent successfully! ', mtInfor matio n,[mb OK ], 0 );
   except
    OnE:Exception do
      b egin    Me ssage Dlg('Er r or w hil ese ndi ng amessa ge: '+
         E.Me ssa ge , mtWarning, [m bOK], 0);     end;
   end ;
  fi na lly     / / l ibera ção do s  objet os da mem ór i a
   F reeAndN i l (I dMes sage);
    FreeAn d Ni l (IdSSLIOHandle rSocke t) ; 
 Fr eeA ndNil(IdSM TP );
 e nd;
end ; 
B u t  Io nly get thiserror fromG mai l:
htt ps :// a ccount s.goo gl e .co m/ContinueS ignI n?sarp=1& scc=1s d f[...]P lease l og invia  yo ur w e bbr ows er and th ent ryagain.
Le ar n mor e at h t tps: //s uppo rt.go ogle.com/mail /an swer / 787 54 t1 sm252 6415 lc c.25- gsmt p
I d id  log on https:/ /acc ounts.goo gle .c om/ Co ntinu e SignIn ?sa rp= 1&scc=1 sdf[... ]  bu tI d id n't tell me anythi ng r ea lly. 

A :

Itw as  b e cause Go og lebloc k e d log in t h is  way. 
S o afte r  s pe nding 1 0hourstr ipl e c hecki n g ev ery po ssible s ettin g  in my code If ound this pag e :h t tp s ://w ww. google.com/ sett i ngs/ secu r it y/l e sssec ureap ps an d  enabled access for  " less s ecure  apps".
UPDAT E:
After t h a t  try tosend an e-mail with De lphiand then i f  it fail s log  into yo ur Gmaila c count an d v isi t t hes e 2pages:
https: / / myac co unt.goo gle .com/de vic e-a cti vit yhttps://m yaccount .g oo gl e. com /secu r eaccount 
a ndco nfi rm th i s new"unkn ownde vi c e"is you( it ' s  you rDe lphi  ap p) .

 Q :

F i ndout who  is logge d i n  onli nu x using  python

I ha ve  8 servers  t hat  I wou l d  like to  monitor. All servers h a ve a to rna do py thon  server i nst alled.  On e  of th e serv ers i sa m o n itort h at  po ll s other se r v ers  andal erts  me bySMS if there is ap rob lem.
One of t healer t s  i s w h en a u se r  lo g s  into one of th e servers. 
H o wcan I useP yth on  to det ect who  is l o gged in  on my Ub untu serv er ?
In e edto returnlogged i n users t o  them ai n mon ito r.
I h op e t his m akes t h ing s cle ar..
A: 

Thebestth ing I fo und online is psutil.

Message sent_successfully!', mtInformation,_[mbOK], 0);
  _ except
__ __ On E:Exception_do
  _   begin
_  __   MessageDlg('Error while sending a message:'+
      __ _E.Message,_mtWarning,_[mbOK], 0);
   _  end;
  _ end;
_ finally
    // liberação dos_objetos_da memória
 _  FreeAndNil(IdMessage);
    FreeAndNil(IdSSLIOHandlerSocket);
  _ FreeAndNil(IdSMTP);
  end;
end;

But I only_get this error_from_Gmail:
https://accounts.google.com/ContinueSignIn?sarp=1&scc=1sdf[...]_Please log in via_your web browser and
then try again.
_Learn more at
 https://support.google.com/mail/answer/78754 t1sm2526415lcc.25 -_gsmtp
I did log on https://accounts.google.com/ContinueSignIn?sarp=1&scc=1sdf[...] but I_didn't tell me anything really. 

A:

It_was because Google blocked login_this way._
So after spending 10 hours_triple checking every_possible setting_in my code_I found this page:
https://www.google.com/settings/security/lesssecureapps
and enabled access_for "less secure_apps".
UPDATE:
After that try to send an_e-mail_with Delphi and_then_if_it fails_log into your_Gmail_account and_visit_these 2 pages:
https://myaccount.google.com/device-activity
https://myaccount.google.com/secureaccount
and confirm this new_"unknown_device" is you (it's your Delphi app).

_Q:

Find out who is_logged_in on linux using_python

I have 8 servers that_I would like to monitor. All_servers have_a tornado_python server installed. One of the servers is a monitor that_polls other servers and alerts me_by SMS if there_is a_problem.
One_of the alerts_is_when a_user logs into one of the servers.
How_can I_use Python to detect who is_logged in on my_Ubuntu_server?
I need to return logged in_users to the main monitor.
I hope_this makes things clear..

A:

The best_thing_I_found online is psutil.
