Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
epics-modules
require
Commits
ef77393b
Commit
ef77393b
authored
19 years ago
by
luedeke
Browse files
Options
Downloads
Patches
Plain Diff
copy from /work
modified $COLUMNS to ${COLUMNS:-120} to supress error by cron job
parent
b5455990
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
App/scripts/bootinfo
+48
-17
48 additions, 17 deletions
App/scripts/bootinfo
with
48 additions
and
17 deletions
App/scripts/bootinfo
+
48
−
17
View file @
ef77393b
...
...
@@ -5,30 +5,67 @@
#Parameters:
function
help
()
{
echo
"usage:
bootinfo
[options] [pattern]"
echo
"usage:
$(
basename
$0
)
[options] [pattern]"
echo
" Find boot information about %pattern% in database"
echo
"options are:"
echo
" -h, -?, --help : print this help and quit"
echo
" -v, --version : print cvs version info and quit"
echo
" -d : print BOOTDATE"
echo
" -t : print BOOTTIME"
echo
" -b : print BOOTPC"
echo
" -S : print SLSBASE"
echo
" -E : print EPICS version"
echo
" -V : print vxWorks version"
echo
" -i : print IP_ADDR"
echo
" -A : print ARCH"
echo
" -a : print a lot (= -dtbSEViA)"
echo
" --noheader : don't print table header"
echo
" -- : treat next word as pattern, even if starting with -"
exit
0
}
function
version
()
{
echo
'Author: D. Zimoch'
echo
'$Date: 200
4/08/02 09:05:46
$'
echo
'$Date: 200
5/10/25 10:00:52
$'
echo
'$Source: /cvs/G/DRV/misc/App/scripts/bootinfo,v $'
exit
0
}
HSEL
=
"SYSTEM AS IOC"
DEFAULTSEL
=
",BOOTDATE,BOOTTIME,BOOTPC,SLSBASE,
EPICSVER AS EPICS,VXWORKSVER AS VXWORKS,IPADDR AS IP_ADDR,
SUBSTR(VXWORKS,INSTR(VXWORKS,'/',-1,2)+1,
INSTR(VXWORKS,'/',-1,1)-INSTR(VXWORKS,'/',-1,2)-1) AS ARCH"
while
true
do
case
"
$1
"
in
--noheader
)
OPTS
=
"SET HEADING OFF;"
;;
-
*
h
*
|
-
*
\?
*
|
--help
)
help
;;
-
*
v
*
|
--version
)
version
;;
--
)
shift
;
break
;;
-
*
)
echo
"Unknown option
$1
. Try: --help"
exit
1
;;
-
*
)
OPTION
=
$1
while
true
do
OPTION
=
${
OPTION
:1
}
case
"
$OPTION
"
in
d
*
)
SEL
=
"
$SEL
,BOOTDATE"
;;
t
*
)
SEL
=
"
$SEL
,BOOTTIME"
;;
b
*
)
SEL
=
"
$SEL
,BOOTPC"
;;
E
*
)
SEL
=
"
$SEL
,EPICSVER AS EPICS"
;;
V
*
)
SEL
=
"
$SEL
,VXWORKSVER AS VXWORKS"
;;
i
*
)
SEL
=
"
$SEL
,IPADDR AS IP_ADDR"
;;
e
*
)
SEL
=
"
$SEL
,ETHADDR AS ETH_ADDR"
;;
S
*
)
SEL
=
"
$SEL
,SLSBASE"
;;
A
*
)
SEL
=
"
$SEL
,SUBSTR(VXWORKS,INSTR(VXWORKS,'/',-1,2)+1,
INSTR(VXWORKS,'/',-1,1)-INSTR(VXWORKS,'/',-1,2)-1) AS ARCH"
;;
f
*
)
SEL
=
"
$SEL
,VXWORKS AS FILENAME"
;;
a
*
)
OPTION
=
-dtbSEViA
${
OPTION
:1
}
;;
""
)
break
;;
*
)
echo
"Unknown option -
${
OPTION
:0:1
}
. Try: --help"
exit
1
;;
esac
done
;;
*
)
break
;;
esac
shift
...
...
@@ -41,10 +78,13 @@ else
export
LD_LIBRARY_PATH
=
$ORACLE_HOME
/lib:
$LD_LIBRARY_PATH
fi
eval
$(
resize 2>/dev/null
)
$ORACLE_HOME
/bin/sqlplus
-s
ssrm_public/pub01@psip0
<<
EOF
SET PAGESIZE 10000;
SET LINESIZE
1000
;
SET LINESIZE
${
COLUMNS
:-
120
}
;
SET FEEDBACK OFF;
$OPTS
COLUMN IOC FORMAT A17;
COLUMN SLSBASE FORMAT A7;
...
...
@@ -52,16 +92,7 @@ COLUMN EPICS FORMAT A7;
COLUMN VXWORKS FORMAT A7;
COLUMN ARCH FORMAT A15;
SELECT SYSTEM AS IOC,
BOOTDATE,
BOOTTIME,
BOOTPC,
SLSBASE,
EPICSVER AS EPICS,
VXWORKSVER AS VXWORKS,
IPADDR,
SUBSTR(VXWORKS,INSTR(VXWORKS,'/',-1,2)+1,
INSTR(VXWORKS,'/',-1,1)-INSTR(VXWORKS,'/',-1,2)-1) AS ARCH
SELECT
${
HSEL
}
${
SEL
:-
$DEFAULTSEL
}
FROM SSRM.IOC_LASTBOOTED
WHERE SYSTEM LIKE '%
$1
%' OR
BOOTPC LIKE '%
$1
%' OR
...
...
@@ -76,7 +107,7 @@ ORDER BY 1;
EXIT
EOF
# $Name: $
# $Id: bootinfo,v 1.1
1
200
4/08/02 09:05:46 zimoch
Exp $
# $Id: bootinfo,v 1.1
2
200
5/10/25 10:00:52 luedeke
Exp $
# $Source: /cvs/G/DRV/misc/App/scripts/bootinfo,v $
# $Revision: 1.1
1
$
# $Revision: 1.1
2
$
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment