Python pxssh failed on login. could not set shell prompt probably pxssh cannot find right prompt so it is better to setup original prompt s.prompt() and don`t forget to setup auto_prompt_reset = False from pexpect import pxssh import getpass try : s = pxssh . pxssh ( timeout = 60 ) s . force_password = True hostname = raw_imput ( 'hostname: ' ) username = raw_input ( 'password: ' ) password = getpass . getpass ( 'password: ' ) s . PROMPT = 'SSH> ' #here is your original prompt s . login ( hostname , username , password , auto_prompt_reset = False ) s . prompt () s . sendline ( 'show version' ) #your command is here s . prompt () data = s . before print data s . logout () except pxssh . ExceptionPxssh , e : print "pxssh failed on login." print str ( e )
How to clean DB from old logs in Magento 1.x Using MySQL truncate log_customer ; truncate log_quote ; truncate log_summary ; truncate log_summary_type ; truncate log_url ; truncate log_url_info ; truncate log_visitor ; truncate log_visitor_info ; truncate log_visitor_online ; login to shell(SSH) go with root/shell folder. execute the below command inside the shell folder php - f log . php clean enter this command to view the log data's size php -f log.php status This method will help you to clean the log data's very easy way.
Comments
Post a Comment