如何用C shell and Korn shell 管理 Windows HPC Server 集群系统
知道不?通过SUA(微软UNIX应用子系统),你可以用熟悉的C Shell和Korn Shell来运行PowerShell命令!如果你有Windows Server 2003 R2, Windows Server 2008 或是Windows Vista的旗舰版或企业版,那么快快装上SUA试试吧。
步骤如下:
1. 通过添加删除Windows组件安装SUA,Vista用户请参照
这篇文章,Windows Server 2003 R2用户请参照
另一篇文章。
2. 在C Shell中你可以使用如下命令 (需替换 "headnode"为你的集群头节点)
cd /dev/fs/C/Windows/System32/WindowsPowerShell/v1.0/
./powershell.exe -command get-hpcnode -scheduler headnode
alias nodelist ./powershell.exe -command get-hpcnode -scheduler headnode
nodelist
nodelist | grep Online
这里有一篇文章讲述了如何让PowerShell和SUA一起工作. 这个
blog上还有一些评论讨论了在SUA中执行UNIX命令(试试搜索"SUA")
How to use C shell and Korn shell to manage a Windows HPC Server cluster?
Did you know you can use the familiar C shell and Korn shell under SUA (Subsystem for UNIX-based Applications) to call our PowerShell commands? If you have Windows Server 2003 R2, Windows Server 2008 or Windows Vista Ultimate and Enterprise editions, then you can install SUA and try it out.
Here are the steps:
1. Install SUA via Add/Remove Windows Components. See
this post for how to do that on Vista, and see
this one for Windows Server 2003 R2.
2. Here are a few commands you can use in C Shell (You need to substitute "headnode" with your head node name)
cd /dev/fs/C/Windows/System32/WindowsPowerShell/v1.0/
./powershell.exe -command get-hpcnode -scheduler headnode
alias nodelist ./powershell.exe -command get-hpcnode -scheduler headnode
nodelist
nodelist | grep Online
See
this post on more info about how PowerShell and SUA work together. There's a comment in
this blog also talks about using class UNIX commands in SUA. (Search for the "SUA" wording)