Skip to content

Instantly share code, notes, and snippets.

@codeachange
Last active January 31, 2018 03:49
Show Gist options
  • Save codeachange/561d414f8621f2ea284fbcff6a2796a6 to your computer and use it in GitHub Desktop.
Save codeachange/561d414f8621f2ea284fbcff6a2796a6 to your computer and use it in GitHub Desktop.
windows dump current process command line to file using wmic
# 获取所有进程的所有信息
wmic /output:d:\\tmp\\proc.csv process
# 获取指定进程的命令行参数和内存大小
wmic /output:d:\\tmp\\proc.csv process where name=\"java.exe\" get commandline,workingsetsize
# Note
# 如果output指定的文件被其他程序打开,会报错:Invalid file name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment