delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/09/18:44:36

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <171430-220021219234411182@M2W039.mail2web.com>
X-Priority: 3
Reply-To: cygwin AT cygwin DOT com
X-Originating-IP: 195.92.67.65
From: "elfyn-cygwin AT mail DOT exposure DOT org DOT uk" <elfyn-cygwin AT mail DOT exposure DOT org DOT uk>
To: jtwilley AT brightmail DOT com, cygwin AT cygwin DOT com
Subject: RE: Problem with cygrunsrv
Date: Mon, 9 Dec 2002 18:44:11 -0500
MIME-Version: 1.0
X-OriginalArrivalTime: 09 Dec 2002 23:44:11.0183 (UTC) FILETIME=[DF8AC3F0:01C29FDC]
Note-from-DJ: This may be spam
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id gB9NiZ318875

Hi,

It could be that when the cygrunsrv stuff goes through your shell and \\
becomes \ and \ becomes nothing (??). Just a thought.

What happens if you double ecsape the forward slashes?

cygrunsrv -I perflog -p /cygdrive/c/WINNT/perflog.exe -t manual -a '-o
c:\\\\perflogs\\\\diesel.csv -s 1 -c "\\\\Processor(_Total)\\\\% Processor
Time" -c "\\\\SMTP Server(_Total)\\\\Messages Sent/sec"' 

Elfyn
elfyn AT exposure DOT org DOT uk

Original Message:
-----------------
From: Jack Twilley jtwilley AT brightmail DOT com
Date: Mon, 09 Dec 2002 15:27:20 -0800
To: cygwin AT cygwin DOT com
Subject: Problem with cygrunsrv


I have a program someone wrote me that works fine from the command
line, but doesn't work when run as a service.

The following command works from a local Windows command shell:

perflog -o c:\perflogs\diesel.csv -s 1 -c "\Processor(_Total)\% Processor
Time" -c "\SMTP Server(_Total)\Messages Sent/sec"

The program does the right thing, writing one line every second to the
diesel.csv file containing the performance counter values mentioned on
the command line.

Here's my cygrunsrv line:

cygrunsrv -I perflog -p /cygdrive/c/WINNT/perflog.exe -t manual -a '-o
c:\\perflogs\\diesel.csv -s 1 -c "\\Processor(_Total)\\% Processor Time" -c
"\\SMTP Server(_Total)\\Messages Sent/sec"' 

This line returns no errors.  Here's the line I used to start the
service:

cygrunsrv -S perflog

This took a while (quite a few seconds) but returned with a prompt.
I suspect the program partially runs, as the data file is created.
Here's the line I used to stop the service:

cygrunsrv -E perflog

This waited quite some time before returning with an error:

cygrunsrv: Error stopping a service: ControlService:  Win32 error 1061:
The service cannot accept control messages at this time.

I get a similar response when I try to remove the service.

Help?

Jack.
-- 
Jack Twilley // Tier 2 Support Engineer // Brightmail Inc.
jtwilley at brightmail dot com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019