Forum Replies Created
-
AuthorReplies
-
Super fast – and the PID’s are stores in an exec subfolder I believe. Very good to know. Thanks
March 20, 2025 at 8:17 pm in reply to: Setting AUTOSTART in tcl script and save updates into NetConfig file #121908…… typos types …. : )
March 20, 2025 at 8:16 pm in reply to: Setting AUTOSTART in tcl script and save updates into NetConfig file #121907Thanks for the insite – figured a way to do it (in the “sandbox”) for fun; but aware to use with caution.
Hello – question on the opposite of shutting down Cloverleaf. But to make sure I’m understanding properly. To fully shutdown Cloverleaf you first shutdown all the processes in the site, then shutdown the monitor daemon and lock manager in the site; then move on to other sites until all processes, monitor daemon and lock manager are shutdown in all the sites. Is that correct?
To fully/properly start up Cloverleaf , go into each site, start all the processes, then start the lock manager, then the monitor daemon in the site; then do the same on the rest of the Cloverleaf sites (?). We are running Cloverleaf on a linux environment.
We’re looking to do the shutdown and start up of Cloverleaf manually though scripts.
Thanks in advance.
[ Found that hcirootcopy does not do the TAR of the sites in the “old” environment, but brings in the sites TAR’d in the old environment into the new environment. ]
Hello – question about hcirootcopy; does it basically just tar an entire site for migration into 22.09? Then untar the site in the 22.09 server? Is there more to it? If you have some sample of the command use that would be great. Thanks in advance.
March 10, 2025 at 12:02 pm in reply to: Setting AUTOSTART in tcl script and save updates into NetConfig file #121858Thanks – keeping it all in mind; came up with a combination of tcl / ksh script; testing good so far.
March 3, 2025 at 6:26 pm in reply to: Setting AUTOSTART in tcl script and save updates into NetConfig file #121842Hello – thanks for the comments; sounds like a direct text edit on the NetConfig file is the only way. Was trying to see if programmatically possible because we only want to do the AUTOSTART reset on inbound threads. Thanks again. Javier
Initially I tested explicitly with one process, one thread, one site, and it all worked smoothly; now it looks like a time out (as you mentioned) may be occurring and the threads do not stop. Also, seems the hcicmd command to stop the thread works when script is run when setsite is set to the site where the thread lives. Can the perl command be run from a tcl script via “exec”?
Great to know and good news – thanks.
Hello – thank you for the details. I’ll play around with the code, have lots to learn still.
Hello – thanks for the code. I tried running a test, but still having probs. Below is that I have tested, and the output of the run. I run the script when setsite is “dev_lab”. Running CL version 20.1. Thanks
#!/bin/env tcl
#####################################################################
# need to reditect output to file to capture output
# based on clovertech sample
# Tcl program to obtain Routing info for each thread
# Author: James Cobane
##########################################################global hciRoot global hciSite
global siteDirset hciRoot $env(HCIROOT)
set hciSite $env(HCISITE)
set siteDir $env(HCISITEDIR)set netConfigName [lindex $argv 0]
netcfgLoad $netConfigName
#set connList [lsort [netcfgGetConnList]]#jd
#headings
puts “Site#Process#SourceThrd#IbHost#IbPort#IbType#IbAutoStrt#IsSrvr#IbDirParseProc#IbFtpDir#SrcInDataProc#SrcOutDataProc#TrxID#RawRtProc#XlPreProc#XlPostProc#XlType#Xlate#DestThrd#ObHost#ObPort#ObType#ObAutoStrt#ObIsSrvr#ObFtpDir#DestInDataProc#DestOutDataProc”
#jd end
#set site1 “dev_misc”
set site1 “devcb2a”# from clovertech
set ret_cd [catch {eval [exec ${::env(HCIROOT)}/sbin/hcisetenv -site tcl $site1]} err]
sleep 1
if {$ret_cd} {
echo “>>> Switch to site >$site1< failed… EXITING <<<”
exit
}if ![catch {netcfgLoad $hciRoot/$site1/NetConfig} err] {
if {$err} {
puts “>>> Failed to load NetConfig >$site1< failed EXITING <<< ”
exit
}
set connList [lsort [netcfgGetConnList]]
echo “CONN LIST: ” $connList
}
exit=== output ====
[hci WIP]$ ./tpsTest.tcl
Site#Process#SourceThrd#IbHost#IbPort#IbType#IbAutoStrt#IsSrvr#IbDirParseProc#IbFtpDir#SrcInDataProc#SrcOutDataProc#TrxID#RawRtProc#XlPreProc#XlPostProc#XlType#Xlate#DestThrd#ObHost#ObPort#ObType#ObAutoStrt#ObIsSrvr#ObFtpDir#DestInDataProc#DestOutDataProc
Global variable name ‘ukg’ not found
Global variable name ‘ukg_login’ not found
Global variable name ‘lawprod’ not found
Global variable name ‘lawprod’ not found
Global variable name ‘lawprod’ not found
Global variable name ‘lawprod’ not found
Global variable name ‘lawprod’ not found
Global variable name ‘lawprod’ not found
Global variable name ‘ftp_proview’ not found
Global variable name ‘ftp_gempos’ not found
Global variable name ‘lawprod’ not found
Global variable name ‘ftp_proview’ not found
>>> Failed to load NetConfig >devcb2a< failed EXITING <<<Hello – still having some issues with the NetConfig read/parse script that I have been “playing” with. The script is based on feedback/input from this forum and its highly appreciated.
The script is mostly fuctional (?! 🙂 ), but it hits an error when the NetConfig that is being read/parsed has references to global variables. I’ve tried a few suggestions found in the forum, but I can’t get this to work.
For example, if setsite is set to dev_lab, and I ran the script the script throws errors when it reads the NetConfig for the devcb2a site because the NetConfig for devcb2a has references to global variables, but the global variables don’t exist in the dev_lab site or environment (at least that’s what I think the issue is). I believe I need to set the site to the site that corresponds to the NetConfig that is being read/parsed. How can I change or set the site (setsite) environment to the appropriate site? Thanks in advance.
Script segment below:
#!/bin/env tcl
#####################################################################
# need to reditect output to file to capture output
# based on clovertech sample
# Tcl program to obtain Routing info for each thread
# Author: James Cobane
#####################################################################global hciRoot global hciSite
global siteDirset hciRoot $env(HCIROOT)
set hciSite $env(HCISITE)
set siteDir $env(HCISITEDIR)set netConfigName [lindex $argv 0]
netcfgLoad $netConfigName
set connList [lsort [netcfgGetConnList]]
#jd
#headings
puts “Site#Process#SourceThrd#IbHost#IbPort#IbType#IbAutoStrt#IsSrvr#IbDirParseProc#IbFtpDir#SrcInDataProc#SrcOutDataProc#TrxID#RawRtProc#XlPreProc#XlPostProc#XlType#Xlate#DestThrd#ObHost#ObPort#ObType#ObAutoStrt#ObIsSrvr#ObFtpDir#DestInDataProc#DestOutDataProc”
#jd end
#set site1 “dev_misc”
set site1 “devcb2a”##if ![catch {netcfgLoad} err] {
##NCFG:ChangeSite $site1
##puts “>>>> CHANGING SITE pre netconfig load<<<<<”
##netcfgLoad
##puts “>>>> post netconfig load<<<<<”
##}
##exitset siteList [lsort $site1]
foreach site $siteList {
if ![catch {netcfgLoad $hciRoot/$site/NetConfig} err] {
NCFG:ChangeSite $site
netcfgLoad
if [string equal $err “1”] {
puts “>>>> $site ERROR HERE?!?! $err <<<<<”
exit
}
.
.
.Hello – found that I was missing one command in the sequence I was originally testing.
[dev_pt_mgmt]$ tcltcl>netconfig load1tcl>netconfig get version3.20tcl>netconfig get connection listto_masimo_NPE_adt to_collectivemed_adt to_iecg_adt …..///// was missing this commandtcl> set to_masimo_NPE_adt [netconfig get connection data to_masino_NPE_adt]{ AUTOSTART 1 }{ BITMAP {} }{ COORDS {0 0} }{ DATAFORMAT {{ FRLTYPE offlen }{ OFFLEN {{ LEN 0 }. . .tcl>keylget to_masimo_NPE_adt PROTOCOL.PORT10974tcl> keylkeys to_masimo_NPE_adtAUTOSTART BITMAP COORDS. . .tcl>Hello – thanks for the details. The bulk of the interfaces are new and will need new sites created when moved to live; a few interfaces will be additions to existing sites in production. Maybe have a sort of template NetConfig to use after the interfaces are moved to live and swap with the new production NetConfigs as you suggest. Thanks again.
-
AuthorReplies