Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Operating System - Microsoft
cancel
Showing results for 
Search instead for 
Did you mean: 

anyone else play w/cygwin?

Manuel Contreras
Regular Advisor

anyone else play w/cygwin?

I started to gather some stats from our windows boxes through the use of cygwin and sshd :)

is anyone else doing this sort of thing?

interested in some other indicators I should be checking for...

thanks,
manuel

the following are examples of what I am able to retrieve remotely, from our WINDOWS boxes (w/cygwin and sshd configured)


checking filesystem stats:

Filesystem 1K-blocks Used Available Use% Mounted on
C:/cygwin/bin 22019740 11584704 10435036 53% /usr/bin
C:/cygwin/lib 22019740 11584704 10435036 53% /usr/lib
C:/cygwin 22019740 11584704 10435036 53% /
C: 22019740 11584704 10435036 53% /cygdrive/c
D: 40963196 10887108 30076088 27% /cygdrive/d
E: 797064716 41262988 755801728 6% /cygdrive/e


checking memory stats:

total used free shared buffers cached
Mem: 2097151 0 2097151 0 0 0
Swap: 1046528 58272 988256


/cygdrive/c/WINDOWS/system32/mem:

655360 bytes total conventional memory
655360 bytes available to MS-DOS
633536 largest executable program size

1048576 bytes total contiguous extended memory
0 bytes available contiguous extended memory
941056 bytes available XMS memory
MS-DOS resident in High Memory Area


vmstat (virtual memory statistics) info:

procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 58268 2097151 0 0 0 0 0 0 0 0 0 0 99 0
0 0 58268 2097151 0 0 0 0 0 0 654 6408 1 0 98 0
0 0 58268 2097151 0 0 0 0 0 0 751 5581 0 0 100 0
0 0 58268 2097151 0 0 0 0 0 0 597 5991 0 0 100 0
0 0 58268 2097151 0 0 0 0 0 0 632I started to gather some stats from our windows boxes through the use of cygwin and sshd :)

is anyone else doing this sort of thing?

interested in some other indicators I should be checking for...

thanks,
manuel

the following are examples of what I am able to retrieve remotely, from our WINDOWS boxes (w/cygwin and sshd configured)


checking filesystem stats:

Filesystem 1K-blocks Used Available Use% Mounted on
C:/cygwin/bin 22019740 11584704 10435036 53% /usr/bin
C:/cygwin/lib 22019740 11584704 10435036 53% /usr/lib
C:/cygwin 22019740 11584704 10435036 53% /
C: 22019740 11584704 10435036 53% /cygdrive/c
D: 40963196 10887108 30076088 27% /cygdrive/d
E: 797064716 41262988 755801728 6% /cygdrive/e


checking memory stats:

total used free shared buffers cached
Mem: 2097151 0 2097151 0 0 0
Swap: 1046528 58272 988256


/cygdrive/c/WINDOWS/system32/mem:

655360 bytes total conventional memory
655360 bytes available to MS-DOS
633536 largest executable program size

1048576 bytes total contiguous extended memory
0 bytes available contiguous extended memory
941056 bytes available XMS memory
MS-DOS resident in High Memory Area


vmstat (virtual memory statistics) info:

procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 58268 2097151 0 0 0 0 0 0 0 0 0 0 99 0
0 0 58268 2097151 0 0 0 0 0 0 654 6408 1 0 98 0
0 0 58268 2097151 0 0 0 0 0 0 751 5581 0 0 100 0
0 0 58268 2097151 0 0 0 0 0 0 597 5991 0 0 100 0
0 0 58268 2097151 0 0 0 0 0 0 632 5770 0 0 100 0


checking active WINDOWS processes:

PID PPID PGID WINPID TTY UID STIME COMMAND
4 0 0 4 ? 0 Apr 22 *** unknown ***
336 0 0 336 ? 0 Dec 3 \SystemRoot\System32\smss.exe
384 0 0 384 ? 0 Dec 3 \??\C:\WINDOWS\system32\csrss.exe
412 0 0 412 ? 0 Dec 3 \??\C:\WINDOWS\system32\winlogon.exe
...
7700 0 0 7700 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\MDXKPIOffline.exe
7424 0 0 7424 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\MDXKPIOnline.exe
6416 0 0 6416 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\notify.exe
7276 0 0 7276 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\tiancontentservice.exe
1876 0 0 1876 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\contentAgent.exe
6928 0 0 6928 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\synchronize.exe
8480 0 0 8480 ? 0 Dec 24 C:\Program Files\McAfee\Common Framework\naPrdMgr.exe
5770 0 0 100 0


checking active WINDOWS processes:

PID PPID PGID WINPID TTY UID STIME COMMAND
4 0 0 4 ? 0 Apr 22 *** unknown ***
336 0 0 336 ? 0 Dec 3 \SystemRoot\System32\smss.exe
384 0 0 384 ? 0 Dec 3 \??\C:\WINDOWS\system32\csrss.exe
412 0 0 412 ? 0 Dec 3 \??\C:\WINDOWS\system32\winlogon.exe
...
7700 0 0 7700 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\MDXKPIOffline.exe
7424 0 0 7424 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\MDXKPIOnline.exe
6416 0 0 6416 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\notify.exe
7276 0 0 7276 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\tiancontentservice.exe
1876 0 0 1876 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\contentAgent.exe
6928 0 0 6928 ? 0 Dec 10 E:\Everest\Websrvr\BPU\bin\synchronize.exe
8480 0 0 8480 ? 0 Dec 24 C:\Program Files\McAfee\Common Framework\naPrdMgr.exe
3 REPLIES
Alan_152
Honored Contributor

Re: anyone else play w/cygwin?

Are you using cygwin just for sshd? Seems like overkill to me.

http://sshwindows.sourceforge.net/
Manuel Contreras
Regular Advisor

Re: anyone else play w/cygwin?

pretty cool... minimal cygwin install included in openssh :)

will nave to take a look.

D Challen
Occasional Visitor

Re: anyone else play w/cygwin?

A lot of similar information will be available using programs from the pstools suite. I'm a Unix user myself, so familiar with ssh and the normal GNU system tools, however when forced to use Windows I usually find pstools enough for my needs. It has a remote execution tool (psexec) as well as analogues of many of the stand GNU utils (pskill, pslist, psloggedon). psinfo will also be useful. All the tools work remotely through a rather neat hack that means you don't have to install anything on the machine you're interested in querying. Be aware that it's just system information stuff - if you're looking to do text-processing of the output you'll probably still want GNU's text utils (i.e. grep, sed, awk etc) or Perl.

http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx for Pstools. In fact given what you're doing I'd suggest getting the entire Sysinternals suite. Despite (now) being Microsoft owned, the tools follow the Unix philosophy of doing one and doing it well.

However the 'client' side, that is, your machine which is sending the remote query needs to be Windows as well, though I suppose there's nothing to stop you sshing from a Linux/Unix machine to a Windows machine that has the pstools installed.

I'd also imagine that someone somewhere has experimented with remote monitoring using powershell, which you might find worth Googling for, if you're prepared to fight powershell's rather braindead design.