XML et parsing

Fermé
JP - 20 mai 2014 à 13:12
 Utilisateur anonyme - 20 mai 2014 à 19:22
Bonjour,


J'ai réalisé ceci mais, je ne parviens à afficher mes attributs. Pourriez vous m'aider SVP ?

Merci



#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime, re
from xml.dom.minidom import parse, parseString
# start output file
output = open('output.csv', 'a')
output.write('\n<----debut a: ')

dom = None
while not dom:
xml_file = raw_input("\n--> Indiquez le nom du fichier source : ")
try:
dom = parse(xml_file)
except KeyboardInterrupt:
print "Arrêt à la demande l'utilisateur"
sys.exit(1)
except Exception, e:
print "Erreur de lecture du fichier ! (%s)", str(e)

#get current time and put in output file
now = datetime.datetime.now()
print ""
output.write(now.strftime("%Y-%m-%d %H:%M"))
output.write(' ----->\n')
output.write(',,,,,,,,,\n')
output.write('EXEC/log, start,duration/severity,CMD/event, RESULT')

#setup variables
logstart = []
EXECstart = []
args = ''
date = ''
args = []
durationseverity = []
CMDevent = []
RESULT = []

#scaninfo = dom.getElementsByTagName('log')[0]
#date = scaninfo.getAttribute("log")
#args = scaninfo.getAttribute('log')

#define translateXml
def translateXml(node):

if node.nodeName == '</EXEC>':
# = node.getAttribute('start')
output.write(node.getAttribute('start'))
output.write(',')
output.write(node.getAttribute('severity'))
output.write(',')

elif node.nodeName == 'EXEC':

if 'EXEC' in node.getAttribute('start'):
output.write('\n')
output.write(',')
#EXEC = node.getAttribute('EXEC')
output.write(node.getAttribute('duration'))
output.write(',')

elif node.nodeName == "RESULT":
output.write('\n')
output.write(',')
output.write(',')
output.write(',')
RESULT.append(node.getAttribute("RESULT"))
output.write(node.getAttribute("RESULT"))
output.write(',')

elif node.nodeName == "start":
portstate.append(node.getAttribute('start'))
output.write(node.getAttribute('start'))
output.write(',')

#break down xml to get details
for node in dom.getElementsByTagName('log'):

#second level within host tag
for subnode in node.childNodes: #go through each subnode of
if subnode.attributes is not None: #if the subnode has attributes parse them
translateXml(subnode) #send the attribute to translateXml
if len(subnode.childNodes) > 0: #if there are childnodes then dig deeper
#third level
for subsubnode in subnode.childNodes: #loop through childnodes
if subsubnode.attributes is not None: #if the susubnode has attributes parse them
translateXml(subsubnode) #send the attribute to translateXml
if len(subsubnode.childNodes) > 0:
#fourth level
for subsubsubnode in subsubnode.childNodes:
if subsubsubnode.attributes is not None:
translateXml(subsubsubnode) #translate the xml

print logstart
dom.unlink()
output.close()


Le fichier de l'objet du parsing



<execution jobId="MZ_VSR Serveurs Shell_Courrier Infrastructure_Host Connection by Shell" destinationid="f0eb1ae5c56084d83332ac5f94a4cad4" max_store_sent_results="2147483647">
<destination>
<destinationData name="id">f0eb1ae5c56084d83332ac5f94a4cad4</destinationData>
<destinationData name="ip_address">221.129.130.115</destinationData>
<destinationData name="host_key">005056B01371</destinationData>
<destinationData name="ip_domain">Confiance C</destinationData>
<destinationData name="mac_addrs">${NA}</destinationData>
<destinationData name="host_cmdbid">${NA}</destinationData>
<destinationData name="ip_mac_address">NA</destinationData>
<destinationData name="hostId">dd787e2dca5c05c2981f990740edc1bf</destinationData>
<destinationData name="connected_os_credentials_id">NA</destinationData>
</destination>
<protocol name="ssh" cm_credential_id="691_1_CMS">
<object id="50b76e17ce122399d426baaf8d667d8a" id_type="CmdbObjectID" class="sshprotocol" isReference="false" is_anchor="false">
<attribute name="sshprotocol_version" type="String">SSH2 or SSH1</attribute>
<attribute name="protocol_pce_command_list" type="String">cstm,dmidecode,lsof,.*netstat,swlist</attribute>
<attribute name="sshprotocol_hello_timeout" type="String">10000</attribute>
<attribute name="protocol_type" type="String">sshprotocol</attribute>
<attribute name="cm_credential_id" type="String">691_1_CMS</attribute>
<attribute name="sshprotocol_authmode" type="String">publickey</attribute>
<attribute name="protocol_timeout" type="String">25000</attribute>
<attribute name="protocol_index" type="Integer">1</attribute>
<attribute name="sshprotocol_prompts" type="Unknown" />
<attribute name="sshprotocol_sudo_su_policy" type="String">sudo</attribute>
<attribute name="protocol_username" type="String">ze1ucmdb</attribute>
<attribute name="protocol_netaddress" type="String">DEFAULT</attribute>
<attribute name="protocol_port" type="String">22</attribute>
<attribute name="protocol_sl_sudo_paths" type="String">/usr/bin/sudo</attribute>
<attribute name="protocol_sl_mode" type="String">sudo</attribute>
<attribute name="sshprotocol_sudo_paths" type="String">/usr/bin/sudo</attribute>
<attribute name="sshprotocol_sudo_commands" type="String">cstm,dmidecode,lsof,.*netstat,swlist</attribute>
<attribute name="user_label" type="String">Utilisateur Unix ze1ucmdb + Clé publique + Sudo</attribute>
<attribute name="sshprotocol_keypath" type="String">F:\APPLI\ze1\w5\hp\UCMDB\DataFlowProbe\conf\security\ze1ucmdb_CPNV0867_identity</attribute>
<attribute name="sshprotocol_shell_env_sep_char" type="String">;</attribute>
<attribute name="protocol_in_use" type="Boolean">false</attribute>
<attribute name="protocol_pce_policy" type="String">sudo_like</attribute>
</object>
</protocol>
<params>
<param param_name="onlyStampingClient" param_value="true" />
<param param_name="maxThreadRuntime" param_value="900000" />
<param param_name="taskType" param_value="regular" />
<param param_name="udaConnectionOrder" param_value="last" />
<param param_name="language" param_value="NA" />
<param param_name="useAIXhwId" param_value="false" />
<param param_name="enableStamping" param_value="false" />
<param param_name="JOB_ID" param_value="MZ_VSR Serveurs Shell_Courrier Infrastructure_Host Connection by Shell" />
<param param_name="codepage" param_value="NA" />
</params>
<log start="00:01:12" severity="info">Execution current time:2014/04/22 00:01:12</log>
<CONNECT start="00:01:16" duration="1187" CMD="client_connect" RESULT="success" type="ssh" credentialsId="691_1_CMS">
<ClientProperties>
<prop name="sshprotocol_sudo_su_policy" value="sudo" />
<prop name="protocol_index" value="1" />
<prop name="protocol_timeout" value="25000" />
<prop name="credentialsId" value="691_1_CMS" />
<prop name="sshprotocol_sudo_commands" value="cstm,dmidecode,lsof,.*netstat,swlist" />
<prop name="sshprotocol_keypath" value="F:\APPLI\ze1\w5\hp\UCMDB\DataFlowProbe\conf\security\ze1ucmdb_CPNV0867_identity" />
<prop name="cm_credential_id" value="691_1_CMS" />
<prop name="sshprotocol_shell_env_sep_char" value=";" />
<prop name="protocol_type" value="sshprotocol" />
<prop name="protocol_netaddress" value="DEFAULT" />
<prop name="sshprotocol_authmode" value="publickey" />
<prop name="sshprotocol_prompts" value="" />
<prop name="sshprotocol_hello_timeout" value="10000" />
<prop name="protocol_port" value="22" />
<prop name="protocol_sl_mode" value="sudo" />
<prop name="protocol_sl_sudo_paths" value="/usr/bin/sudo" />
<prop name="sshprotocol_version" value="SSH2 or SSH1" />
<prop name="user_label" value="Utilisateur Unix ze1ucmdb + Clé publique + Sudo" />
<prop name="protocol_username" value="ze1ucmdb" />
<prop name="sshprotocol_sudo_paths" value="/usr/bin/sudo" />
<prop name="protocol_in_use" value="false" />
<prop name="BandwidthLimit" value="0" />
<prop name="protocol_pce_policy" value="sudo_like" />
<prop name="protocol_pce_command_list" value="cstm,dmidecode,lsof,.*netstat,swlist" />
</ClientProperties>
</CONNECT>
<EXEC start="00:01:16" duration="15" CMD="ver" RESULT="-bash: ver: command not found" />
<log start="00:01:16" severity="debug">Check for Cygwin installed on Windows</log>
<EXEC start="00:01:16" duration="0" CMD="cmd.exe /c ver" RESULT="-bash: cmd.exe: command not found" />
<log start="00:01:16" severity="debug">Check for IBM VIO Server Shell</log>
<EXEC start="00:01:16" duration="31" CMD="ioscli uname -a" RESULT="-bash: ioscli: command not found" />
<log start="00:01:16" severity="debug">Failed detecting IBM VIO Server. -bash: ioscli: command not found</log>
<EXEC start="00:01:16" duration="0" CMD="uname" RESULT="Linux" />
<log start="00:01:16" severity="debug">Unix detected</log>
<EXEC start="00:01:16" duration="0" CMD="getShellCmdSeperator" RESULT=";" />
<log start="00:01:16" severity="debug">Determining shell environment status variable...</log>
<log start="00:01:16" severity="debug">determining shell:</log>
<log start="00:01:16" severity="debug">trying: 'echo $SHELL'</log>
<EXEC start="00:01:16" duration="16">
<CMD>[CDATA: echo $SHELL]</CMD>
<RESULT>[CDATA: /bin/bash]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">res: '/bin/bash'</log>
<log start="00:01:16" severity="debug">response: '/bin/bash'</log>
<log start="00:01:16" severity="debug">trying: 'echo $?'...</log>
<EXEC start="00:01:16" duration="0">
<CMD>[CDATA: echo $?]</CMD>
<RESULT>[CDATA: 0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">res: '0'...</log>
<log start="00:01:16" severity="debug">response: '0'</log>
<log start="00:01:16" severity="debug">found shell environment status variable='$?'</log>
<EXEC start="00:01:16" duration="16">
<CMD>[CDATA: uname ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: Linux
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Using charset: Cp1252</log>
<log start="00:01:16" severity="debug">Can encode: True</log>
<EXEC start="00:01:16" duration="0" CMD="setCharset" RESULT="windows-1252" />
<EXEC start="00:01:16" duration="0" CMD="getSudoPaths" RESULT="/usr/bin/sudo" />
<EXEC start="00:01:16" duration="0">
<CMD>[CDATA: getSudoCommands]</CMD>
<RESULT>[CDATA: cstm,dmidecode,lsof,.*netstat,swlist]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">adding alternate cmd='locale -a | grep -E "en_US.*|^C|POSIX"'</log>
<log start="00:01:16" severity="debug">adding alternate cmd='locale -a | /usr/xpg4/bin/grep -E "en_US.*|^C|POSIX"'</log>
<log start="00:01:16" severity="debug">__getSudoPath: checking "/usr/bin/sudo -V;echo $?" command</log>
<EXEC start="00:01:16" duration="31">
<CMD>[CDATA: /usr/bin/sudo -V;echo $?]</CMD>
<RESULT>[CDATA: Sudo version 1.6.8p12
0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">__getSudoPath: execution of '/usr/bin/sudo -V;echo $?' succeeded - setting it as sudo path</log>
<EXEC start="00:01:16" duration="31">
<CMD>[CDATA: /usr/bin/sudo -l ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: User ze1ucmdb may run the following commands on this host:
(ALL) ALL
(ALL) NOPASSWD: /usr/sbin/dmidecode
(ALL) NOPASSWD: /bin/netstat -nap
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Command locale -a is configured to run with sudo on destination.</log>
<log start="00:01:16" severity="debug">Command grep -E "en_US.* is configured to run with sudo on destination.</log>
<log start="00:01:16" severity="debug">Command ^C is configured to run with sudo on destination.</log>
<log start="00:01:16" severity="debug">Command POSIX" is configured to run with sudo on destination.</log>
<EXEC start="00:01:16" duration="47">
<CMD>[CDATA: locale -a | grep -E "en_US.*|^C|POSIX" ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: C
en_US
en_US.iso885915
en_US.utf8
POSIX
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">command='locale -a | grep -E "en_US.*|^C|POSIX"' ended successfully</log>
<EXEC start="00:01:16" duration="16">
<CMD>[CDATA: cmd.exe /c "exit /b 0" ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: -bash: cmd.exe: command not found
ERROR_CODE:127]</RESULT>
</EXEC>
<EXEC start="00:01:16" duration="31">
<CMD>[CDATA: set ComSpec ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: ERROR_CODE:0]</RESULT>
</EXEC>
<EXEC start="00:01:16" duration="16">
<CMD>[CDATA: echo $SHELL ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: /bin/bash
ERROR_CODE:0]</RESULT>
</EXEC>
<EXEC start="00:01:16" duration="15">
<CMD>[CDATA: echo $SHELL ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: /bin/bash
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Bourne-like shell detected</log>
<log start="00:01:16" severity="debug">Command Not_Existing_Command is configured to run with sudo on destination.</log>
<EXEC start="00:01:16" duration="32">
<CMD>[CDATA: Not_Existing_Command ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: -bash: Not_Existing_Command: command not found
ERROR_CODE:127]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Command LANG="en_US.iso885915" && export LANG is configured to run with sudo on destination.</log>
<EXEC start="00:01:16" duration="93">
<CMD>[CDATA: LANG="en_US.iso885915" && export LANG ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Command LC_ALL="en_US.iso885915" && export LC_ALL is configured to run with sudo on destination.</log>
<EXEC start="00:01:16" duration="16">
<CMD>[CDATA: LC_ALL="en_US.iso885915" && export LC_ALL ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Locale set to: en_US.iso885915</log>
<EXEC start="00:01:16" duration="15">
<CMD>[CDATA: cmd.exe /c "exit /b 0" ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: -bash: cmd.exe: command not found
ERROR_CODE:127]</RESULT>
</EXEC>
<EXEC start="00:01:16" duration="16">
<CMD>[CDATA: set ComSpec ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: ERROR_CODE:0]</RESULT>
</EXEC>
<EXEC start="00:01:16" duration="0">
<CMD>[CDATA: echo $SHELL ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: /bin/bash
ERROR_CODE:0]</RESULT>
</EXEC>
<EXEC start="00:01:16" duration="16">
<CMD>[CDATA: echo $SHELL ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: /bin/bash
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Bourne-like shell detected</log>
<log start="00:01:16" severity="debug">Command echo ${PATH-notExists} is configured to run with sudo on destination.</log>
<EXEC start="00:01:16" duration="0">
<CMD>[CDATA: echo ${PATH-notExists} ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: /home/ze1ucmdb/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/sbin:/usr/local/sbin:/usr/sbin:/opt/csw/bin:/opt/csw/sbin
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Command PATH=${PATH}":/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin" && export PATH is configured to run with sudo on destination.</log>
<EXEC start="00:01:16" duration="15">
<CMD>[CDATA: PATH=${PATH}":/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin" && export PATH ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:16" severity="debug">Current connected credential id is [NA]</log>
<log start="00:01:16" severity="debug">Connected credential id is irrelevant for this host - Not DDMI/UDA agent [ssh]</log>
<log start="00:01:16" severity="debug">creating object for obj_name=ssh</log>
<log start="00:01:16" severity="debug">Parameter for enableStamping:false</log>
<log start="00:01:16" severity="debug">Parameter for onlyStampingClient:true</log>
<EXEC start="00:01:16" duration="0">
<CMD>[CDATA: echo ~]</CMD>
<RESULT>[CDATA: /home/ze1ucmdb]</RESULT>
</EXEC>
<EXEC start="00:01:16" duration="0">
<CMD>[CDATA: cat ~/.discagnt/aioptionrc; echo ERRORCODE:$?]</CMD>
<RESULT>[CDATA: cat: /home/ze1ucmdb/.discagnt/aioptionrc: No such file or directory
ERRORCODE:1]</RESULT>
</EXEC>
<EXEC start="00:01:17" duration="0">
<CMD>[CDATA: cat ~/.discagnt/aioptionrc; echo ERRORCODE:$?]</CMD>
<RESULT>[CDATA: cat: /home/ze1ucmdb/.discagnt/aioptionrc: No such file or directory
ERRORCODE:1]</RESULT>
</EXEC>
<EXEC start="00:01:17" duration="0">
<CMD>[CDATA: cat ~/.discagnt/aioptionrc; echo ERRORCODE:$?]</CMD>
<RESULT>[CDATA: cat: /home/ze1ucmdb/.discagnt/aioptionrc: No such file or directory
ERRORCODE:1]</RESULT>
</EXEC>
<EXEC start="00:01:17" duration="0">
<CMD>[CDATA: cat ~/.discagnt/aioptionrc; echo ERRORCODE:$?]</CMD>
<RESULT>[CDATA: cat: /home/ze1ucmdb/.discagnt/aioptionrc: No such file or directory
ERRORCODE:1]</RESULT>
</EXEC>
<EXEC start="00:01:17" duration="0">
<CMD>[CDATA: cat ~/.discagnt/aioptionrc; echo ERRORCODE:$?]</CMD>
<RESULT>[CDATA: cat: /home/ze1ucmdb/.discagnt/aioptionrc: No such file or directory
ERRORCODE:1]</RESULT>
</EXEC>
<EXEC start="00:01:17" duration="0">
<CMD>[CDATA: cat ~/.discagnt/aioptionrc; echo ERRORCODE:$?]</CMD>
<RESULT>[CDATA: cat: /home/ze1ucmdb/.discagnt/aioptionrc: No such file or directory
ERRORCODE:1]</RESULT>
</EXEC>
<log start="00:01:17" severity="debug">Get uduid from client:None</log>
<log start="00:01:17" severity="debug">Final value of uduid:None</log>
<log start="00:01:17" severity="debug">Get UD_UNIQUE_ID:None</log>
<log start="00:01:17" severity="debug">Command hostname is configured to run with sudo on destination.</log>
<EXEC start="00:01:17" duration="0">
<CMD>[CDATA: hostname ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: CQYV0203
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:17" severity="debug">Found CQYV0203' for 221.129.130.115</log>
<log start="00:01:17" severity="debug">Command rpm -qa is configured to run with sudo on destination.</log>
<log start="00:01:17" severity="debug">Command grep f5base is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="1623">
<CMD>[CDATA: rpm -qa | grep f5base ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: ERROR_CODE:1]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command vmware -v is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="16">
<CMD>[CDATA: vmware -v ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: -bash: vmware: command not found
ERROR_CODE:127]</RESULT>
</EXEC>
<EXEC start="00:01:19" duration="0">
<CMD>[CDATA: cat /etc/resolv.conf ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: search net2-courrier.extra.laposte.fr
nameserver 187.0.30.228
nameserver 186.0.30.228
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command ps aux is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep dhclient is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep -v grep is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="16">
<CMD>[CDATA: ps aux | grep dhclient | grep -v grep ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: ERROR_CODE:1]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">can't list dhcp enabled interfaces: Output is empty</log>
<log start="00:01:19" severity="debug">adding alternate cmd='/sbin/ip addr show'</log>
<log start="00:01:19" severity="debug">adding alternate cmd='ip addr show'</log>
<log start="00:01:19" severity="debug">Command /sbin/ip addr show is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="62">
<CMD>[CDATA: /sbin/ip addr show ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:b0:13:71 brd ff:ff:ff:ff:ff:ff
inet 221.129.130.115/24 brd 221.129.130.255 scope global eth0
inet6 fe80::250:56ff:feb0:1371/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:b0:34:2f brd ff:ff:ff:ff:ff:ff
inet 221.129.36.223/24 brd 221.129.36.255 scope global eth1
inet6 fe80::250:56ff:feb0:342f/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:b0:75:b6 brd ff:ff:ff:ff:ff:ff
inet 221.129.79.209/24 brd 221.129.79.255 scope global eth2
inet6 fe80::250:56ff:feb0:75b6/64 scope link
valid_lft forever preferred_lft forever
5: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">command='/sbin/ip addr show' ended successfully</log>
<log start="00:01:19" severity="debug">Command ls /proc/net/bonding is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="16">
<CMD>[CDATA: ls /proc/net/bonding ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: /bin/ls: /proc/net/bonding: No such file or directory
ERROR_CODE:2]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">can't list bonding interfaces</log>
<log start="00:01:19" severity="debug">Host key was found: 005056B01371</log>
<log start="00:01:19" severity="debug">Command uptime && date -u '+%Y-%m-%d %H:%M:%S' is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="46">
<CMD>[CDATA: uptime && date -u '+%Y-%m-%d %H:%M:%S' ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: 12:01am up 945 days 13:13, 1 user, load average: 0.10, 0.03, 0.01
2014-04-21 22:01:19
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command dmidecode -t system is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command dmidecode -t system is matched by privileged command pattern dmidecode</log>
<log start="00:01:19" severity="debug">Command dmidecode -t system is matched by privileged command pattern dmidecode</log>
<log start="00:01:19" severity="debug">Command dmidecode -t system is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command dmidecode -t system will be prefixed with /usr/bin/sudo</log>
<EXEC start="00:01:19" duration="47">
<CMD>[CDATA: /usr/bin/sudo dmidecode -t system | grep -A 6 "System Information" ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: System Information
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
Version: None
Serial Number: VMware-42 30 41 2c 06 a1 21 1b-8d 5b 47 da 4c 0b a0 36
UUID: 4230412C-06A1-211B-8D5B-47DA4C0BA036
Wake-up Type: Power Switch
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command dmesg is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep eth2 is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep Up is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="31">
<CMD>[CDATA: dmesg | grep eth2 | grep Up ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
eth2: NIC Link is Up 10000 Mbps
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command mii-diag eth2 is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="0">
<CMD>[CDATA: mii-diag eth2 ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: -bash: mii-diag: command not found
ERROR_CODE:127]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command dmesg is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep eth1 is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep Up is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="16">
<CMD>[CDATA: dmesg | grep eth1 | grep Up ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
eth1: NIC Link is Up 10000 Mbps
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command mii-diag eth1 is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="16">
<CMD>[CDATA: mii-diag eth1 ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: -bash: mii-diag: command not found
ERROR_CODE:127]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command dmesg is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep eth0 is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep Up is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="0">
<CMD>[CDATA: dmesg | grep eth0 | grep Up ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
eth0: NIC Link is Up 10000 Mbps
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command mii-diag eth0 is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="15">
<CMD>[CDATA: mii-diag eth0 ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: -bash: mii-diag: command not found
ERROR_CODE:127]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">adding alternate cmd='uname -r'</log>
<log start="00:01:19" severity="debug">adding alternate cmd='/usr/bin/uname -r'</log>
<log start="00:01:19" severity="debug">Command uname -r is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="0">
<CMD>[CDATA: uname -r ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: 2.6.16.60-0.69.1-smp
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">command='uname -r' ended successfully</log>
<log start="00:01:19" severity="debug">Command hostname is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="16">
<CMD>[CDATA: hostname ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: CQYV0203
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command dnsdomainname is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="0">
<CMD>[CDATA: dnsdomainname ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="warn">Get OS Domain Name by dnsdomainname command failed</log>
<log start="00:01:19" severity="warn">Failed to get OS Domain Name by hostname</log>
<log start="00:01:19" severity="debug">Command cat /etc/nsswitch.conf is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command cut -d# -f1 is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep "^hosts:" is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command tail -1 is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command cut -d: -f2- is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="31">
<CMD>[CDATA: cat /etc/nsswitch.conf | cut -d# -f1 | grep "^hosts:" | tail -1 | cut -d: -f2- ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: files dns
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command cat /etc/hosts is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command cut -d# -f1 is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command grep -i "CQYV0203 \ is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command CQYV0203$" is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command head -1 is configured to run with sudo on destination.</log>
<EXEC start="00:01:19" duration="31">
<CMD>[CDATA: cat /etc/hosts | cut -d# -f1 | grep -i "CQYV0203 \|CQYV0203$" | head -1 ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: 221.129.79.209 CQYV0203 CQYV0203.net2-courrier.extra.laposte.fr
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="warn">Get OS Domain Name by /etc/hosts failed</log>
<log start="00:01:19" severity="warn">Get OS Domain Name by DNS-request failed</log>
<EXEC start="00:01:19" duration="0">
<CMD>[CDATA: cat /etc/resolv.conf ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: search net2-courrier.extra.laposte.fr
nameserver 187.0.30.228
nameserver 186.0.30.228
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="warn">Failed getting OS domain name</log>
<log start="00:01:19" severity="debug">Command dmidecode --version is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command dmidecode --version is matched by privileged command pattern dmidecode</log>
<log start="00:01:19" severity="debug">Command dmidecode --version is matched by privileged command pattern dmidecode</log>
<log start="00:01:19" severity="debug">Command dmidecode --version is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command dmidecode --version will be prefixed with /usr/bin/sudo</log>
<EXEC start="00:01:19" duration="16">
<CMD>[CDATA: /usr/bin/sudo dmidecode --version ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: 2.9
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">Command dmidecode -t system is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command dmidecode -t system is matched by privileged command pattern dmidecode</log>
<log start="00:01:19" severity="debug">Command dmidecode -t system is matched by privileged command pattern dmidecode</log>
<log start="00:01:19" severity="debug">Command dmidecode -t system is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command dmidecode -t system will be prefixed with /usr/bin/sudo</log>
<EXEC start="00:01:19" duration="16">
<CMD>[CDATA: /usr/bin/sudo dmidecode -t system | grep "SMBIOS" ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: SMBIOS 2.4 present.
ERROR_CODE:0]</RESULT>
</EXEC>
<log start="00:01:19" severity="debug">The version of dmidecode detected:2.9</log>
<log start="00:01:19" severity="debug">The global setting 'setBiosUuidToMicrosoftStandart':false</log>
<log start="00:01:19" severity="debug">The bios uuid has already been in the correct format.</log>
<log start="00:01:19" severity="debug">Command netstat -r -n is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command netstat -r -n is matched by privileged command pattern .*netstat</log>
<log start="00:01:19" severity="debug">Command netstat -r -n is matched by privileged command pattern .*netstat</log>
<log start="00:01:19" severity="debug">Command netstat -r -n is configured to run with sudo on destination.</log>
<log start="00:01:19" severity="debug">Command netstat -r -n will be prefixed with /usr/bin/sudo</log>
<EXEC start="00:01:34" duration="14985">
<CMD>[CDATA: /usr/bin/sudo netstat -r -n ; echo ERROR_CODE:$?]</CMD>
<RESULT IS_NULL="Y"></RESULT>
<ERROR class="com.hp.ucmdb.discovery.library.clients.protocols.command.TimeoutException">
<message>[CDATA: Command timed out: Exceeded timeout after 15000 milliseconds]</message>
<stacktrace>
<frame class="com.hp.ucmdb.discovery.library.clients.agents.ssh.SSHAgent" method="doExecuteCommandSSH" file="SSHAgent.java" line="944" />
<frame class="com.hp.ucmdb.discovery.library.clients.agents.ssh.SSHAgent" method="doExecuteCommand" file="SSHAgent.java" line="784" />
<frame class="com.hp.ucmdb.discovery.library.clients.shell.ShellClient$1" method="executePrivateString" file="ShellClient.java" line="154" />
<frame class="com.hp.ucmdb.discovery.library.clients.executors.StringExecutor" method="executePrivate" file="StringExecutor.java" line="21" />
<frame class="com.hp.ucmdb.discovery.library.clients.executors.Executor" method="execute" file="Executor.java" line="26" />
<frame class="com.hp.ucmdb.discovery.library.clients.BaseClient" method="exec" file="BaseClient.java" line="411" />
<frame class="com.hp.ucmdb.discovery.library.clients.shell.ShellClient" method="executeCmd" file="ShellClient.java" line="157" />
<frame class="sun.reflect.GeneratedMethodAccessor121" method="invoke" file="unknown" line="-1" />
<frame class="sun.reflect.DelegatingMethodAccessorImpl" method="invoke" file="DelegatingMethodAccessorImpl.java" line="43" />
<frame class="java.lang.reflect.Method" method="invoke" file="Method.java" line="601" />
<frame class="org.python.core.PyReflectedFunction" method="__call__" file="PyReflectedFunction.java" line="186" />
<frame class="org.python.core.PyReflectedFunction" method="__call__" file="PyReflectedFunction.java" line="204" />
<frame class="org.python.core.PyObject" method="__call__" file="PyObject.java" line="441" />
<frame class="org.python.core.PyObject" method="__call__" file="PyObject.java" line="447" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="154" />
<frame class="org.python.pycode._pyx25" method="_UnixShell__executeCommand$181" file="shellutils" line="1907" />
<frame class="org.python.pycode._pyx25" method="call_function" file="shellutils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="149" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="327" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="124" />
<frame class="org.python.pycode._pyx25" method="_execute$191" file="shellutils" line="2016" />
<frame class="org.python.pycode._pyx25" method="call_function" file="shellutils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="149" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="327" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="124" />
<frame class="org.python.pycode._pyx25" method="execCmd$87" file="shellutils" line="835" />
<frame class="org.python.pycode._pyx25" method="call_function" file="shellutils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="301" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="157" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="338" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="139" />
<frame class="org.python.pycode._pyx58784" method="getCommandsOutput$125" file="TTY_Connection_Utils" line="927" />
<frame class="org.python.pycode._pyx58784" method="call_function" file="TTY_Connection_Utils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="301" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="141" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="327" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="124" />
<frame class="org.python.pycode._pyx58784" method="discoverDefaultGateway$230" file="TTY_Connection_Utils" line="2045" />
<frame class="org.python.pycode._pyx58784" method="call_function" file="TTY_Connection_Utils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="134" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="317" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="109" />
<frame class="org.python.pycode._pyx58784" method="discover$218" file="TTY_Connection_Utils" line="1949" />
<frame class="org.python.pycode._pyx58784" method="call_function" file="TTY_Connection_Utils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="134" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="317" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="109" />
<frame class="org.python.pycode._pyx58784" method="getOSandStuff$293" file="TTY_Connection_Utils" line="2906" />
<frame class="org.python.pycode._pyx58784" method="call_function" file="TTY_Connection_Utils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="301" />
<frame class="org.python.core.PyFunction" method="function___call__" file="PyFunction.java" line="376" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="371" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="361" />
<frame class="org.python.pycode._pyx58792" method="doDiscovery$13" file="HostConnectionByShell" line="458" />
<frame class="org.python.pycode._pyx58792" method="call_function" file="HostConnectionByShell" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="301" />
<frame class="org.python.core.PyFunction" method="function___call__" file="PyFunction.java" line="376" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="371" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="361" />
<frame class="org.python.pycode._pyx58792" method="DiscoveryMain$2" file="HostConnectionByShell" line="210" />
<frame class="org.python.pycode._pyx58792" method="call_function" file="HostConnectionByShell" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="134" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="317" />
<frame class="org.python.pycode._pyx58795" method="f$0" file="<string>" line="2" />
<frame class="org.python.pycode._pyx58795" method="call_function" file="<string>" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyCode" method="call" file="PyCode.java" line="18" />
<frame class="org.python.core.Py" method="runCode" file="Py.java" line="1275" />
<frame class="org.python.core.Py" method="exec" file="Py.java" line="1319" />
<frame class="org.python.util.PythonInterpreter" method="exec" file="PythonInterpreter.java" line="206" />
<frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="executeScript" file="ExecutionEngineImpl.java" line="251" />
<frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="executeScript" file="ExecutionEngineImpl.java" line="226" />
<frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="executeScript" file="ExecutionEngineImpl.java" line="222" />
<frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="executeScripts" file="ExecutionEngineImpl.java" line="139" />
<frame class="com.hp.ucmdb.discovery.library.execution.impl.ExecutionEngineImpl" method="execute" file="ExecutionEngineImpl.java" line="96" />
<frame class="com.hp.ucmdb.discovery.probe.services.dynamic.core.TablesProcessorUtil" method="processDestinationTables" file="TablesProcessorUtil.java" line="136" />
<frame class="com.hp.ucmdb.discovery.probe.services.dynamic.core.DynamicService" method="discover" file="DynamicService.java" line="76" />
<frame class="com.hp.ucmdb.discovery.probe.agents.probemgr.taskexecuter.JobExecuter" method="launchTask" file="JobExecuter.java" line="1199" />
<frame class="com.hp.ucmdb.discovery.probe.agents.probemgr.taskexecuter.JobExecuter$JobExecuterWorker" method="launch" file="JobExecuter.java" line="946" />
<frame class="com.hp.ucmdb.discovery.probe.agents.probemgr.taskexecuter.JobExecuter$JobExecuterWorker" method="executeTask" file="JobExecuter.java" line="870" />
<frame class="com.hp.ucmdb.discovery.probe.agents.probemgr.taskexecuter.JobExecuter$JobExecuterWorker" method="run" file="JobExecuter.java" line="733" />
</stacktrace>
</ERROR>
</EXEC>
<log start="00:01:34" severity="debug">Command cat /etc/SuSE-release is configured to run with sudo on destination.</log>
<EXEC start="00:01:49" duration="14984">
<CMD>[CDATA: cat /etc/SuSE-release ; echo ERROR_CODE:$?]</CMD>
<RESULT IS_NULL="Y"></RESULT>
<ERROR class="com.hp.ucmdb.discovery.library.clients.protocols.command.TimeoutException">
<message>[CDATA: Command timed out: Exceeded timeout after 15000 milliseconds]</message>
<stacktrace>
<frame class="com.hp.ucmdb.discovery.library.clients.agents.ssh.SSHAgent" method="doExecuteCommandSSH" file="SSHAgent.java" line="944" />
<frame class="com.hp.ucmdb.discovery.library.clients.agents.ssh.SSHAgent" method="doExecuteCommand" file="SSHAgent.java" line="784" />
<frame class="com.hp.ucmdb.discovery.library.clients.shell.ShellClient$1" method="executePrivateString" file="ShellClient.java" line="154" />
<frame class="com.hp.ucmdb.discovery.library.clients.executors.StringExecutor" method="executePrivate" file="StringExecutor.java" line="21" />
<frame class="com.hp.ucmdb.discovery.library.clients.executors.Executor" method="execute" file="Executor.java" line="26" />
<frame class="com.hp.ucmdb.discovery.library.clients.BaseClient" method="exec" file="BaseClient.java" line="411" />
<frame class="com.hp.ucmdb.discovery.library.clients.shell.ShellClient" method="executeCmd" file="ShellClient.java" line="157" />
<frame class="sun.reflect.GeneratedMethodAccessor121" method="invoke" file="unknown" line="-1" />
<frame class="sun.reflect.DelegatingMethodAccessorImpl" method="invoke" file="DelegatingMethodAccessorImpl.java" line="43" />
<frame class="java.lang.reflect.Method" method="invoke" file="Method.java" line="601" />
<frame class="org.python.core.PyReflectedFunction" method="__call__" file="PyReflectedFunction.java" line="186" />
<frame class="org.python.core.PyReflectedFunction" method="__call__" file="PyReflectedFunction.java" line="204" />
<frame class="org.python.core.PyObject" method="__call__" file="PyObject.java" line="441" />
<frame class="org.python.core.PyObject" method="__call__" file="PyObject.java" line="447" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="154" />
<frame class="org.python.pycode._pyx25" method="_UnixShell__executeCommand$181" file="shellutils" line="1907" />
<frame class="org.python.pycode._pyx25" method="call_function" file="shellutils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" file="PyTableCode.java" line="165" />
<frame class="org.python.core.PyBaseCode" method="call" file="PyBaseCode.java" line="149" />
<frame class="org.python.core.PyFunction" method="__call__" file="PyFunction.java" line="327" />
<frame class="org.python.core.PyMethod" method="__call__" file="PyMethod.java" line="124" />
<frame class="org.python.pycode._pyx25" method="_execute$191" file="shellutils" line="2016" />
<frame class="org.python.pycode._pyx25" method="call_function" file="shellutils" line="-1" />
<frame class="org.python.core.PyTableCode" method="call" fi
A voir également:

1 réponse

Utilisateur anonyme
20 mai 2014 à 13:23
J'ai pas testé mais je pense que l'erreur est dans ces lignes

#scaninfo = dom.getElementsByTagName('log')[0]
#date = scaninfo.getAttribute("log")
#args = scaninfo.getAttribute('log') 


Je mettrais plutôt

scaninfo = dom.getElementsByTagName('log')[0]
date = scaninfo.firstChild.nodeValue
print date # pour voir 
0
Re !

Merci, j'ai essayé avec ce que tu m'a indiqué, et cela fonctionne, mais pas pour le reste de mes attributs. Dois je rajouter des trucs ? comme des print ?

Merci
0
Enfin, ça m'affiche juste l'heure du lancement du programme. Comment faire choper mes attributs du parsing et les mettres dans mon CSV dans les bons en tete ?
0
Utilisateur anonyme
20 mai 2014 à 19:22
rien compris, donne un exemple du résultat et ce que tu veux en sortir au final...
0