-
capturing tool output
From
Rampage@VERT/SESTAR to
All on Thu Jan 3 13:44:43 2019
how can i capture the output of a tool like addfiles when it is executed from aãjavascript via the event subsystem?ããwe can see the output when we run the javascript via jsexec and it runs fineãfrom there... we get a return value of 0 (zero)... if it is run from an event,ãthough, the addfiles execution return value is 1 (one) and we cannot see theãoutput of addfiles so we can see what the problem is that is causing it toãfail...ããwe are running at LogLevel=Debugging... is there a more detailed level thatãwould show us that output?ããthanks!ãã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Digital Man@VERT to
Rampage on Thu Jan 3 12:07:57 2019
Re: capturing tool outputã By: Rampage to All on Thu Jan 03 2019 01:44 pmãã > how can i capture the output of a tool like addfiles when it is executedã > from a javascript via the event subsystem?ããOn *nix-like systems, you can use system.popen() to execute a command-line andãcapture its output.ãã > we can see the output when we run the javascript via jsexec and it runs fineã > from there... we get a return value of 0 (zero)... if it is run from anã > event, though, the addfiles execution return value is 1 (one) and we cannotã > see the output of addfiles so we can see what the problem is that is causingã > it to fail...ããYou could also add ">somefile" to the end of the command-line to redirect theãoutput to a file to be read/reviewed later.ãã > we are running at LogLevel=Debugging... is there a more detailed level thatã > would show us that output?ããNo.ãã digital manããSynchronet/BBS Terminology Definition #15:ãCVS = Concurrent Versioning SystemãNorco, CA WX: 65.0øF, 21.0% humidity, 1 mph W wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Rampage@VERT/SESTAR to
Digital Man on Thu Jan 3 17:15:53 2019
how can i capture the output of a tool like addfiles when it isã >> executed from a javascript via the event subsystem?ãã > On *nix-like systems, you can use system.popen() to execute aã > command-line and capture its output.ããhummm... the problematic system is running winwhatever...ãã >> we can see the output when we run the javascript via jsexec andã >> it runs fine from there... we get a return value of 0 (zero)...ã >> if it is run from an event, though, the addfiles execution returnã >> value is 1 (one) and we cannot see the output of addfiles so weã >> can see what the problem is that is causing it to fail...ãã > You could also add ">somefile" to the end of the command-line to redirectã > the output to a file to be read/reviewed later.ããahh! i'll give that a try...ãã >> we are running at LogLevel=Debugging... is there a more detailedã >> level that would show us that output?ãã > No.ããthanks!ãã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Rampage@VERT/SESTAR to
Digital Man on Thu Jan 3 17:40:17 2019
You could also add ">somefile" to the end of the command-lineã > to redirect the output to a file to be read/reviewed later.ããthis is what i'm going to try now... do you know if it will also capture stderrãin addition to stdout? or do i need to do it something likeãã blahblah >>addfiles.log 2>&1ãã?? and will that work on winwhatever like it does on linux?ãã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Digital Man@VERT to
Rampage on Thu Jan 3 15:50:05 2019
Re: Re: capturing tool outputã By: Rampage to Digital Man on Thu Jan 03 2019 05:40 pmãã > > You could also add ">somefile" to the end of the command-lineã > > to redirect the output to a file to be read/reviewed later.ã >ã > this is what i'm going to try now... do you know if it will also captureã > stderr in addition to stdout? or do i need to do it something likeã >ã > blahblah >>addfiles.log 2>&1ã >ã > ?? and will that work on winwhatever like it does on linux?ãã
https://support.microsoft.com/en-us/help/110930/redirecting-error-messages-fromã-command-prompt-stderr-stdoutããI don't think the "2>&1" construct works on Windows.ãã digital manããSynchronet "Real Fact" #75:ãRob's alias "digital man" was inspired by a song on Rush's 1982 "Signals" album.ãNorco, CA WX: 66.4øF, 19.0% humidity, 2 mph WSW wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Thu Jan 3 17:15:28 2019
-
From
Digital Man@VERT to
Nightfox on Thu Jan 3 18:42:09 2019
Re: Re: capturing tool outputã By: Nightfox to Digital Man on Thu Jan 03 2019 05:15 pmãã > Re: Re: capturing tool outputã > By: Digital Man to Rampage on Thu Jan 03 2019 03:50 pmã >ã > DM> I don't think the "2>&1" construct works on Windows.ã >ã > I've done 2>&1 in Windows, and it works for redirecting stderr to stdout.ã >ã > This is a Microsoft support page, showing it's officially supported: https:/ã > /support.microsoft.com/en-us/help/110930/redirecting-error-messages-fromã > -command-prompt-stderr-stdoutããThat's the same page I quoted in my message! Funny, I just didn't read it allãthe way to bottom.ãã digital manããSynchronet "Real Fact" #24:ã1584 Synchronet BBS Software registrations were sold between 1992 and 1996.ãNorco, CA WX: 56.4øF, 27.0% humidity, 0 mph SW wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Rampage@VERT/SESTAR to
Digital Man on Thu Jan 3 23:07:48 2019
Re: Re: capturing tool outputã By: Digital Man to Rampage on Thu Jan 03 2019 15:50:05ãã > > blahblah >>addfiles.log 2>&1ã >ã > > ?? and will that work on winwhatever like it does on linux?ã >ã >
https://support.microsoft.com/en-us/help/110930/redirecting-errorã > -messages-from -command-prompt-stderr-stdoutã >ã > I don't think the "2>&1" construct works on Windows.ããactually, that page shows it at the bottom of the examples... the only thingãthat i might need is to add a 1 on the first redirection... maybe not, though,ãsince by default, 1 (aka stdout) is redirected in that format...ãã blahblah 1>>addfiles.log 2>&1ããwe'll find out once my tester gets back to me if it worked in theirãsituation...ããthanks for the pointer :)ããã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Fri Jan 4 09:35:49 2019
Re: Re: capturing tool outputã By: Digital Man to Nightfox on Thu Jan 03 2019 06:42 pmãã >> This is a Microsoft support page, showing it's officially supported:ã >> https:/ã >> /support.microsoft.com/en-us/help/110930/redirecting-error-messages-frã >> om ã >> -command-prompt-stderr-stdoutãã DM> That's the same page I quoted in my message! Funny, I just didn't read itã DM> all the way to bottom.ããI should have read your message more carefully to see you had quoted the sameãpage. :PããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Rampage@VERT/SESTAR to
Digital Man on Fri Jan 4 16:11:29 2019
actually, that page shows it at the bottom of the examples... theã > only thing that i might need is to add a 1 on the firstã > redirection... maybe not, though, since by default, 1 (aka stdout)ã > is redirected in that format...ãã > blahblah 1>>addfiles.log 2>&1ãã > we'll find out once my tester gets back to me if it worked in theirã > situation...ããi actually first tried it without the "1" (one) in front of the firstãredirection symbols... that did not work... so we've now added the first "1"ã(one) so the line looks like above and we're trying again...ãã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Nightfox@VERT/DIGDIST to
Rampage on Fri Jan 4 15:32:16 2019
Re: Re: capturing tool outputã By: Rampage to Digital Man on Fri Jan 04 2019 04:11 pmãã >> blahblah 1>>addfiles.log 2>&1ãã Ra> i actually first tried it without the "1" (one) in front of the firstã Ra> redirection symbols... that did not work... so we've now added the firstã Ra> "1" (one) so the line looks like above and we're trying again...ããInteresting.. I'd expect it to work without the 1, since that's the default. ãI wonder if it makes a difference whether you're using 2 redirection symbolsã(>>), which would append if the file exists, or just one, which would alwaysãcreate a new file.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Rampage@VERT/SESTAR to
Nightfox on Sat Jan 5 09:40:53 2019
i actually first tried it without the "1" (one) in front of theã Ra>> first redirection symbols... that did not work... so we've nowã Ra>> added the first "1" (one) so the line looks like above andã Ra>> we're trying again...ãã > Interesting.. I'd expect it to work without the 1, since that's theã > default.ããthat's what we thought, too...ãã > I wonder if it makes a difference whether you're using 2ã > redirection symbols (>>), which would append if the file exists, or justã > one, which would always create a new file.ããit shouldn't matter but winwhatever is... umm... winwhatever... we need theãappend, though, because the next execution run could be good which wouldãoverwrite the recorded error we're trying to hunt down...ãã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Rampage@VERT/SESTAR to
Digital Man on Sun Jan 6 00:53:32 2019
blahblah 1>>addfiles.log 2>&1ãã > we'll find out once my tester gets back to me if it worked in theirã > situation...ããsadly, this didn't work, either :(ãã----- snip -----ã> The issue is happening with anything being TIC'd to me, all areas,ã> all files.ãã> Here's the log line from a failed run:ãã> 1/5 10:57:38a TICKIT Executing: 'C:\sbbs\exec\addfiles nasa -zdã> +C:\sbbs\temp\event\tickit-files.bbs 24 13 1>>C:\sbbs\temp\event\addfiles.logã> 2>&1'.ãã> There was no 'addfiles.log' in my \sbbs\temp\event\ directory, so I thinkã> there's still something not right with that redirect/append syntax...ã----- snip -----ããi don't understand why it isn't working...ããso just to clarify, when run from an event, tickit.js executes addfiles andãaddfiles fails for some unknown reason... the redirection code was added to tryãto capture the addfiles output so we could see the failure but it is notãcaptured either...ããif the above command line is copied and pasted to the terminal command promptãOR if tickit.js is run from jsexec, then addfiles runs properly and the file isãimported into the file base...ããthe only difference we can see is that the temp directory is different betweenãthe two methods of execution but that should not matter...ãã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Digital Man@VERT to
Rampage on Sun Jan 6 00:42:17 2019
Re: Re: capturing tool outputã By: Rampage to Digital Man on Sun Jan 06 2019 12:53 amãã > > blahblah 1>>addfiles.log 2>&1ã >ã > > we'll find out once my tester gets back to me if it worked in theirã > > situation...ã >ã > sadly, this didn't work, either :(ã >ã > ----- snip -----ã > > The issue is happening with anything being TIC'd to me, all areas,ã > > all files.ã >ã > > Here's the log line from a failed run:ã >ã > > 1/5 10:57:38a TICKIT Executing: 'C:\sbbs\exec\addfiles nasa -zdã > > +C:\sbbs\temp\event\tickit-files.bbs 24 13ã > > 1>>C:\sbbs\temp\event\addfiles.log 2>&1'.ã >ã > > There was no 'addfiles.log' in my \sbbs\temp\event\ directory, so I thinkã > > there's still something not right with that redirect/append syntax...ã > ----- snip -----ã >ã > i don't understand why it isn't working...ããThe temp directory is cleared out often, so perhaps you should create theãaddfiles.log somewhere else.ãã digital manããSynchronet/BBS Terminology Definition #63:ãSyncTERM = The Synchronet Terminal Emulator/BBS-client programãNorco, CA WX: 46.4øF, 93.0% humidity, 0 mph SSW wind, 0.21 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Rampage@VERT/SESTAR to
Digital Man on Sun Jan 6 10:11:39 2019
i don't understand why it isn't working...ãã > The temp directory is cleared out often, so perhaps you shouldã > create the addfiles.log somewhere else.ããi'll give that a try, i guess... maybe data/logs is a better place? gotta seeãif i can find the system.blah variable that holds that information...ãã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Rampage@VERT/SESTAR to
Digital Man on Sun Jan 6 17:46:08 2019
The temp directory is cleared out often, so perhaps you shouldã > create the addfiles.log somewhere else.ãããthat was it! now we have a log and guess what they've been fighting all along?ããã> Okay... so about a half hour ago I got a deadbeef, it failed asã> usual, but this time there *IS* an addfiles.log in my \sbbs\dataã> directory!ã> Here's the content of that log:ãã> SBBSCTRL environment variable not set.ãã> Example: SET SBBSCTRL=/sbbs/ctrlãã> ADDFILES v3.03-Win32 (rev 1.54) - Adds Files to Synchronet Filebaseããã> Now.... I do in fact have that env variable set, just went and doubleã> checked it. It's weird how you set it in Windoze, but google told meã> how and I've had it there all along, since first installing the BBS.ã> Confirmed with a "set" command in a terminal window and it shows:ã> SBBSCTRL=C:\sbbs\ctrlãã> Strange...ãããi don't know how they are running their installation on their windows... i'dãprobably be kicking if off from a BAT file and put the necessary SET statementsãin there... i don't know if they are running it from a command prompt or as aãservice or what... i don't do windows anymore so i'm in the dark on where/howãthey need to set this...ãã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã
-
From
Digital Man@VERT to
Rampage on Sun Jan 6 15:50:15 2019
Re: Re: capturing tool outputã By: Rampage to Digital Man on Sun Jan 06 2019 10:11 amãã > > > i don't understand why it isn't working...ã >ã > > The temp directory is cleared out often, so perhaps you shouldã > > create the addfiles.log somewhere else.ã >ã > i'll give that a try, i guess... maybe data/logs is a better place? gottaã > see if i can find the system.blah variable that holds that information...ããsystem.logs_dirãã digital manããSynchronet "Real Fact" #1:ãDevelopment began in 1990 of the (unnamed at the time) Synchronet BBS software.ãNorco, CA WX: 56.8øF, 60.0% humidity, 2 mph NNW wind, 0.21 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Digital Man@VERT to
Rampage on Sun Jan 6 15:52:09 2019
Re: Re: capturing tool outputã By: Rampage to Digital Man on Sun Jan 06 2019 05:46 pmãã > > The temp directory is cleared out often, so perhaps you shouldã > > create the addfiles.log somewhere else.ã >ã >ã > that was it! now we have a log and guess what they've been fighting allã > along?ã >ã >ã > > Okay... so about a half hour ago I got a deadbeef, it failed asã > > usual, but this time there *IS* an addfiles.log in my \sbbs\dataã > > directory!ã > > Here's the content of that log:ã >ã > > SBBSCTRL environment variable not set.ã >ã > > Example: SET SBBSCTRL=/sbbs/ctrlã >ã > > ADDFILES v3.03-Win32 (rev 1.54) - Adds Files to Synchronet Filebaseã >ã >ã > > Now.... I do in fact have that env variable set, just went and doubleã > > checked it. It's weird how you set it in Windoze, but google told meã > > how and I've had it there all along, since first installing the BBS.ã > > Confirmed with a "set" command in a terminal window and it shows:ã > > SBBSCTRL=C:\sbbs\ctrlã >ã > > Strange...ã >ã >ã > i don't know how they are running their installation on their windows... i'dã > probably be kicking if off from a BAT file and put the necessary SETã > statements in there... i don't know if they are running it from a commandã > prompt or as a service or what... i don't do windows anymore so i'm in theã > dark on where/how they need to set this...ããThat's covered in detail here:
http://wiki.synchro.net/config:envãã digital manããThis Is Spinal Tap quote #5:ãNigel Tufnel: Authorities said... best leave it... unsolved.ãNorco, CA WX: 56.8øF, 60.0% humidity, 2 mph NNW wind, 0.21 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Rampage@VERT/SESTAR to
Digital Man on Sun Jan 6 21:41:29 2019
Re: Re: capturing tool outputã By: Digital Man to Rampage on Sun Jan 06 2019 15:52:09ãã > That's covered in detail here:
http://wiki.synchro.net/config:envããi've pointed them to that link... thanks!ããã)\/(arkãã---ã þ Synchronet þ SouthEast Star Mail HUB - SESTARã