Forum Replies Created
-
AuthorReplies
-
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.
Hello! I need to explore this a lot more – thanks for the details.
Hello – thanks! Works great! A great reference for sure. Ideally need to capture site, process, source information (name, ip, port) , destination information (name, ip, port), xlate info, tcl info all in one line/record; your script seems like great starting place. Thanks again.
Hello – thanks! Works great! A great reference for sure. Ideally need to capture site, process, source information (name, ip, port) , destination information (name, ip, port), xlate info, tcl info all in one line/record; your script seems like great starting place. Thanks again.
Hello – comments noted. The plan is to move interfaces to prod well ahead of the to live date with the setting set to not auto start. I was looking for another layer of assurance to keep threads down until ready to be started. Apologies for the late reply and thank you.
Hello – thanks for the insight. We’re looking to have things in the live environment well ahead of the actual go live. The threads will be set to not auto start, but I was curious to see if there might be another layer of safety to prevent anything from coming up.
What happens if siteA, siteB ad SiteC are removed from the server.ini file? This will prevent the sites from coming up? But, this will also prevent the sites from being accessed via the IDE GUI, right? Thanks
April 4, 2023 at 11:40 pm in reply to: failover issues with connectivity ::: Cloverleaf thread transient setting (?) #120461Hello – thank you for the recommendation and the link to the details very much; will keep that option handy. Have discovered that a pdl tcpip thread can be set up to delay the connection so that it connects when there is data to transmit and it would transmit one message per connection; would this option generally be a performance issue in the engine for an adt thread with a steady flow of data? Thanks again.
Hello – thank you; will take that into account as well. JD
Thanks – looking at the string map option. Seems to work from tclsh prompt. Now try in xlate. Appreciate the offer, I may be ok, will find out this afternoon.
-
AuthorReplies