Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Is there any CMD command line that shows all partition letters. For example: C, D, E...
Can that command also show all the partition's information? Free space, used space, total space?
You can use diskpart
c:\>diskpart
Microsoft DiskPart versión 6.1.7600
Copyright (C) 1999-2008 Microsoft Corporation.
En el equipo: DV6470
DISKPART> list volume
Núm Volumen Ltr Etiqueta Fs Tipo Tamaño Estado Info
----------- --- ----------- ----- ---------- ------- --------- --------
Volumen 0 D DVD-ROM 0 B Sin medio
Volumen 1 Reservado NTFS Partición 100 MB Correcto Sistema
Volumen 2 C C NTFS Partición 38 GB Correcto Arranque
It accepts a script as command line parameter:
listvol.cmd:
echo list volume > listvol.scr
diskpart /s listvol.scr
del listvol.scr
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 months ago.
Improve this question
I am trying to test out the new version of cpan-Net-DNS (version 1.35) and it fails in the Net/DNS/Resolver/Base.pm file at line 987 with the following error.
*** FATAL PROGRAM ERROR!! Unknown instance method 'size'
*** which the program has attempted to call for the object:
***
. IN OPT ; no data
***
*** THIS IS A BUG IN THE CALLING SOFTWARE, which incorrectly assumes
*** that the object would be of a particular type. The type of an
*** object should be checked before calling any of its methods.
***
Net::DNS::RR 1714 at Net/DNS/Resolver/Base.pm line 987.
Net::DNS::Resolver::Base::_make_query_packet(Net::DNS::Resolver=HASH(0x55ebcfcd3d68), "example.com") called at Net/DNS/Resolver/Base.pm line 402
Net::DNS::Resolver::Base::send(Net::DNS::Resolver=HASH(0x55ebcfcd3d68), "example.com") called at Net/DNS/Resolver/Base.pm line 374
Has anyone seen this before?
This was on linux version 5.15. I tried the same thing on linux version 5.10 and it works but I can't pin point as to why. Here is the snippet of code I am running. This is on perl5.26
use Test::Simple;
use Net::DNS;
my $resolver = new Net::DNS::Resolver();
my $packet = $resolver->query('example.com');
ok($packet->answersize > 0, "NET::DNS");
I've hacked together a solution that allows me to commit changes to my Go language application to Azure Websites, compile into a Go binary, and then update the Web.Config to have the httpPlatformHandler use the newly created binary. This allows me to easily deploy changes to my Go app and have them (almost) instantly available on my Azure website. It's a neat prototype, and you can check it out here: https://github.com/wadewegner/azure-website-go-builder/
If you look at the last line of the deploy.cmd you'll see that I use Powershell to kill a w3wp.exe process. This forces it to restart and use the updated Web.Config.
powershell "stop-process (Get-Process w3wp | Sort-Object ws | Select -first 1).Id"
This is a hack and not ideal. In a default scenario there are two w3wp.exe processes running - one for our website and one for the SCM website (which is a management website). It will not work if we have more than one instance of our Azure website running. It also assumes that the right process to kill is the one with the smaller memory footprint - this is a bad assumption to make.
In Azure Websites we don't have a lot of facilities at our disposal for finding and killing processes.
When I run Get-Process w3wp ... I get this kind of output today:
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
364 40 7196 16032 85 0.55 5516 w3wp
667 77 61972 77372 350 5.72 3448 w3wp
However, with two instances of my website, it could be:
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
364 40 7196 16032 85 0.55 5516 w3wp
364 40 7196 16032 85 0.55 5517 w3wp
667 77 61972 77372 350 5.72 3448 w3wp
(Manually updated to make my point.)
So, the question is, what's the right way to choose the two processes I want to kill? I don't want to kill 3448.
Additionally, how do I find a better heuristic to choose the right processes?
I uploaded tlist.exe to run tlist -t and get this output:
D:\home\site\wwwroot>tlist -t
AdjustTokenPrivileges failed with 1300
w3wp.exe (5516)
20150107_070323.exe (4936)
w3wp.exe (3448)
cmd.exe (1976)
tlist.exe (5868)
This makes it clear that 5516 is the PID I want to kill.
Is there a way in Powershell to run Get-Process but if it somehow inspect child processes and filter out the w3wp.exe PID with the cmd.exe process?
Thank you!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Here's a cmd.exe batchfile and its run results:
#ECHO OFF
SETLOCAL
SET "w=&echo."
FOR /f "delims=" %%i IN (%~f0) DO ECHO(%%i
ver%w%
ECHO(%PATH:;=&ECHO(%%w%
DIR *.zip%w%
DIR /s \wzunzip.exe \wzcline*.dll%w%
wzunzip -v ancient%w%
wzunzip -v ancient.zip%w%
GOTO :EOF
Run results:
Microsoft Windows [Version 6.1.7601]
C:\executable
C:\batch
C:\Windows
C:\Windows\SysWOW64
C:\Window s\system32
C:\Program Files\WinZip
C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin64
C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin
C:\FPC\2.6.2\bin\i386-win32
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files (x86)\AMD APP\bin\x86_64
C:\Program Files (x86)\CollabNet
C:\Users\Public\Documents\RAD Studio\9.0\Bpl
C:\Users\Public\Documents\RAD Studio\9.0\Bpl\Win64
C:\Windows\System32\Wbem
c:\Program Files (x86)\Common Files\Acronis\SnapAPI\
c:\Program Files (x86)\Acronis\TrueImageHome\
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static
C:\Program Files\TortoiseSVN\bin
C:\Program Files (x86)\RemObjects Software\Oxygene\bin
C:\Program Files (x86)\QuickTime\QTSystem\
C:\windows\System32\WindowsPowerShell\v1.0\
C:\opencobol\bin
C:\Program Files (x86)\OwlyCI
Volume in drive C has no label.
Volume Serial Number is 830B-46FA
Directory of c:\ttbackup\operational
20/04/2009 13:07 1,752,181 ancient.zip
1 File(s) 1,752,181 bytes
0 Dir(s) 129,259,110,400 bytes free
Volume in drive C has no label.
Volume Serial Number is 830B-46FA
Directory of c:\batch
15/07/2013 04:00 13,224 WZUNZIP.EXE
1 File(s) 13,224 bytes
Directory of c:\batchbackup
15/07/2013 04:00 13,224 WZUNZIP.EXE
1 File(s) 13,224 bytes
Directory of c:\Program Files\WinZip
15/07/2013 04:00 13,224 WZUNZIP.EXE
Directory of c:\Program Files\WinZip
15/07/2013 04:00 2,571,688 WZCLINE32.DLL
15/07/2013 04:00 3,084,200 WZCLINE64.DLL
3 File(s) 5,669,112 bytes
Directory of c:\Program Files (x86)\WinZip
15/07/2013 04:00 2,571,688 WZCLINE32.DLL
15/07/2013 04:00 3,084,200 WZCLINE64.DLL
2 File(s) 5,655,888 bytes
Directory of c:\Windows
15/07/2013 04:00 13,224 WZUNZIP.EXE
Directory of c:\Windows
15/07/2013 04:00 2,571,688 wzcline.dll
15/07/2013 04:00 2,571,688 WZCLINE32.DLL
15/07/2013 04:00 3,084,200 WZCLINE64.DLL
4 File(s) 8,240,800 bytes
Total Files Listed:
11 File(s) 19,592,248 bytes
0 Dir(s) 129,259,110,400 bytes free
WinZip(R) Command Line Support Add-On Version 4.0 32-bit (Build 10562)
Copyright (c) 1991-2013 WinZip International LLC - All Rights Reserved
ERROR: option v is unsupported
Program is terminating!
WinZip(R) Command Line Support Add-On Version 4.0 32-bit (Build 10562)
Copyright (c) 1991-2013 WinZip International LLC - All Rights Reserved
ERROR: option v is unsupported
Program is terminating!
Translating, this is Win7 Home Premium, Here's my PATH, directory of .zip files, directory of all occurrences of WZUNZIP.EXE and WZCL*.DLL.
I did have an older version WZCLINE.DLL so I overwrote it with the 32-bit newer version. The run results do not vary whether this WZCLINE.DLL file is present or not.
The results of two attempted listings is shown.
I'm sure this used to work on earlier versions. It is documented as working with the version I have (Winzip 17.5) but no combination of the -v switch appears to be processed according to the documentation.
I've tried -v and -V and -vb, -vr, -vi, -vm, -vt - all with precisely the same complaint from WZUNZIP.
Sadly, WINZIP has started to ignore me, after first having requested the following:
Please provide some additional information.
- Please describe the exact steps you take to cause this problem to occur.
- What version of Windows and of WinZip are you running (you can check the
· WinZip version by clicking WinZip's Help, About WinZip menu item)?
- Are there any error messages that appear? If so, please include the full
· text of the error message and the title of the error dialog box.
- Does the problem happen consistently, or does it appear to happen randomly?
- Does it happen with all files, some files, or one file in particular? If
· the problem happens with one file in particular, can you tell me how to
· obtain a copy of the file?
- Are there any other applications running when the problem occurs?
Please provide the screenshot of the error message you are getting. Please use the following link which will gives you more information in this issue: http://kb.winzip.com/kb/entry/21/
Most of that information is in the report I sent them, so I really don't have much hope of getting competent support there. The only information I can provide in addition is
Yes, it happens consistently on every .zip I've tried it on. - And the Point,click and giggle version has no problem decoding those files.
No, nothing else happening on the system at all.
7zip appears to list the contents happily.
So - anyone with a cure for this error with WZUNZIP? How do I get a file listing for a .zip file
After navigating through the endless canned responses, I finally got to communicate with a technician.
The problem was isolated to my haing changed the PATH sequence, and WZUNZIP was locating prior DLLs on the revised path, hence re-installing the CLI add-on was ineffective.
Uninstalled WINZIP, located all the stray WZ* elements and deleted them, reininstalled and sanity was restored.
(posted for the sake of those who may encounter a similar problem - as evidently some have, given there have been responses)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
i just installed munin-node on my new cent os 5.7 64bit machine via yum.
Installation went fine, i've setup munin and munin-nodes on many machines in the past, but this time i cannot get it to start.
When I try to restart it with the following command this happens:
[root#Server2 munin]# service munin-node restart
Stopping Munin Node agents: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
[FAILED]
Starting Munin Node: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.8.8/Net/Server/Daemonize.pm line 61.
Couldn't find pid in existing pid_file at /usr/lib/perl5/vendor_perl/5.8.8/Net/Server/Daemonize.pm line 61.
[ OK ]
It says [OK] in the end in green, but I don't see it running anywhere.
Also this is the output of munin-node.log
[root#Server2 munin]# tail -n 100 munin-node.log
2011/12/04-03:10:44 Couldn't find pid in existing pid_file at /usr/lib/perl5/vendor_perl/5.8.8/Net/Server/Daemonize.pm line 61.
at line 276 in file /usr/lib/perl5/vendor_perl/5.8.8/Net/Server.pm
2011/12/04-03:10:44 Server closing!
2011/12/04-03:10:54 Couldn't find pid in existing pid_file at /usr/lib/perl5/vendor_perl/5.8.8/Net/Server/Daemonize.pm line 61.
at line 276 in file /usr/lib/perl5/vendor_perl/5.8.8/Net/Server.pm
2011/12/04-03:10:54 Server closing!
Ive looked up line 61 in Daemonize.pm and it is:
my $current_pid = $_current_pid =~ /^(\d{1,10})/ ? $1 : die "Couldn't find pid in existing pid_file";
I've tried to rename the pid file in /etc/munin/munin-node.conf but that also didnt change anything.
Output of:
[root#Server2 plugins]# sudo /usr/sbin/munin-node-configure --suggest
http://pastebin.com/Yd6eX5Ss which seems all perfect to me.
Any idea what I can try?
Removing the original PID file fixed the problem.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
On Linux, the "top" command shows a detailed but high level overview of your memory usage, showing:
Total Memory, Used Memory, Free Memory, Buffer Usage, Cache Usage, Swap size and Swap Usage.
My question is, what commands are available to show these memory usage figures in a clear and simple way? Bonus points if they're present in the "Core" install of Solaris. 'sar' doesn't count :)
Here are the basics. I'm not sure that any of these count as "clear and simple" though.
ps(1)
For process-level view:
$ ps -opid,vsz,rss,osz,args
PID VSZ RSS SZ COMMAND
1831 1776 1008 222 ps -opid,vsz,rss,osz,args
1782 3464 2504 433 -bash
$
vsz/VSZ: total virtual process size (kb)
rss/RSS: resident set size (kb, may be inaccurate(!), see man)
osz/SZ: total size in memory (pages)
To compute byte size from pages:
$ sz_pages=$(ps -o osz -p $pid | grep -v SZ )
$ sz_bytes=$(( $sz_pages * $(pagesize) ))
$ sz_mbytes=$(( $sz_bytes / ( 1024 * 1024 ) ))
$ echo "$pid OSZ=$sz_mbytes MB"
vmstat(1M)
$ vmstat 5 5
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr rm s3 -- -- in sy cs us sy id
0 0 0 535832 219880 1 2 0 0 0 0 0 -0 0 0 0 402 19 97 0 1 99
0 0 0 514376 203648 1 4 0 0 0 0 0 0 0 0 0 402 19 96 0 1 99
^C
prstat(1M)
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
1852 martin 4840K 3600K cpu0 59 0 0:00:00 0.3% prstat/1
1780 martin 9384K 2920K sleep 59 0 0:00:00 0.0% sshd/1
...
swap(1)
"Long listing" and "summary" modes:
$ swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 256,1 16 1048560 1048560
$ swap -s
total: 42352k bytes allocated + 20192k reserved = 62544k used, 607672k available
$
top(1)
An older version (3.51) is available on the Solaris companion CD from Sun, with the disclaimer that this is "Community (not Sun) supported".
More recent binary packages available from sunfreeware.com or blastwave.org.
load averages: 0.02, 0.00, 0.00; up 2+12:31:38 08:53:58
31 processes: 30 sleeping, 1 on cpu
CPU states: 98.0% idle, 0.0% user, 2.0% kernel, 0.0% iowait, 0.0% swap
Memory: 1024M phys mem, 197M free mem, 512M total swap, 512M free swap
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
1898 martin 1 54 0 3336K 1808K cpu 0:00 0.96% top
7 root 11 59 0 10M 7912K sleep 0:09 0.02% svc.startd
sar(1M)
And just what's wrong with sar? :)
# echo ::memstat | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 7308 57 23%
Anon 9055 70 29%
Exec and libs 1968 15 6%
Page cache 2224 17 7%
Free (cachelist) 6470 50 20%
Free (freelist) 4641 36 15%
Total 31666 247
Physical 31256 244
"top" is usually available on Solaris.
If not then revert to "vmstat" which is available on most UNIX system.
It should look something like this (from an AIX box)
vmstat
System configuration: lcpu=4 mem=12288MB ent=2.00
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------------------
r b avm fre re pi po fr sr cy in sy cs us sy id wa pc ec
2 1 1614644 585722 0 0 1 22 104 0 808 29047 2767 12 8 77 3 0.45 22.3
the colums "avm" and "fre" tell you the total memory and free memery.
a "man vmstat" should get you the gory details.
Top can be compiled from sources or downloaded from sunfreeware.com. As previously posted, vmstat is available (I believe it's in the core install?).
The command free is nice. Takes a short while to understand the "+/- buffers/cache", but the idea is that cache and buffers doesn't really count when evaluating "free", as it can be dumped right away. Therefore, to see how much free (and used) memory you have, you need to remove the cache/buffer usage - which is conveniently done for you.