Pages

Monday, June 13, 2016

OEM Agent Clean Upload


export AGENT_HOME=/app/oracle/product/gc10.2/agent10g/



$AGENT_HOME/bin/emctl stop agent



rm -r $AGENT_HOME/sysman/emd/state/*

rm -r $AGENT_HOME/sysman/emd/upload/*

rm $AGENT_HOME/sysman/emd/lastupld.xml

rm $AGENT_HOME/sysman/emd/agntstmp.txt

rm $AGENT_HOME/sysman/emd/protocol.ini






$AGENT_HOME/bin/emctl secure agent


$AGENT_HOME/bin/emctl start agent


$AGENT_HOME/bin/emctl clearstate agent



$AGENT_HOME/bin/emctl upload agent



how to set putty logfile using putty command line

http://stackoverflow.com/questions/21831161/how-to-set-putty-logfile-using-putty-command-line


Solved by windows reg update the putty store the configuration in the registry: The path to the key is: HKEY_CURRENT_USER \Software \SimonTatham \PuTTY \Sessions \Default%20Settings
1- create a reg file for example "settings.reg" content:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"LogFileName"="C:\\..path..\\mylogfile.log"
"LogType"=dword:00000002
in my batch file, i added this line before executing putty.exe
 `reg import settings.reg`
 `putty -x -t -ssh -2 -l root 10.56.56.35 -m commands.txt`