Skip to content
Snippets Groups Projects
Commit 5766b9a8 authored by zimoch's avatar zimoch
Browse files

extract ARCH from last directory component of VXWORKS

Fix output format of IP addr from %-13s to %-15s
parent 05c16563
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
#
'''
$Source: /cvs/G/DRV/misc/App/scripts/bootinfo,v $
$Revision: 1.2 $ $Date: 2004/04/19 11:59:29 $
$Revision: 1.3 $ $Date: 2004/05/03 12:48:57 $
Obtain boot information about IOCs from the ssrm_public Oracle
database and make a pretty printout.
......@@ -91,7 +91,7 @@ if __name__ == "__main__":
ufo.close ()
if hdrNotDone:
toks = string.split (lines[0])
print "\n%-16s %-11s %-8s %-8s %-6s %-8s %-8s %-13s %s" % \
print "\n%-16s %-11s %-8s %-8s %-6s %-8s %-8s %-15s %s" % \
(toks[0], toks[1], toks[2], toks[3], toks[4], toks[5], toks[6], toks[7], toks[8])
hdrNotDone = 0
else:
......@@ -101,15 +101,12 @@ if __name__ == "__main__":
nFnd = nFnd + 1
toks = string.split (line)
if len (toks) >= 9:
archBase = os.path.join (toks[4], "epics/base/bin/")
archBaseLen = len (archBase)
if toks[8][0:archBaseLen] == archBase:
toks[8] = toks[8][archBaseLen:]
toks[8] = os.path.basename(os.path.dirname (toks[8]))
#endif
if toks[8][-8:] == "/vxWorks": toks[8] = toks[8][0:-8]
date = time.strptime ("%s %s" % (toks[1], toks[2]), "%d-%m-%Y %H:%M:%S")
dateStr = time.strftime ("%d-%b-%Y %H:%M:%S", date)
print "%-16s %s %-8s %-7s %-8s %-8s %-13s %s" % \
print "%-16s %s %-8s %-7s %-8s %-8s %-15s %s" % \
(toks[0], dateStr, toks[3], toks[4], toks[5], toks[6], toks[7], toks[8])
#endif
#endfor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment