天天看点

Powershell与运维之服务器管理(一) 利用Powershell管理HP服务器

今天主要介绍怎么通过HP的powershell模块来调试Integrated Lights-Out(ILO)管理卡,以及获取相关的一些服务器的硬件信息。

1首先我们先安装HP官方开发的模块,下载链接:

<a href="http://h20565.www2.hp.com/portal/site/hpsc/public/psi/swdHome/?cc=us&amp;lang=en&amp;sp4ts.oid=5440658&amp;ac.admitted=1406104743446.876444892.492883150" target="_blank">http://h20565.www2.hp.com/portal/site/hpsc/public/psi/swdHome/?cc=us&amp;lang=en&amp;sp4ts.oid=5440658&amp;ac.admitted=1406104743446.876444892.492883150</a>

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347356Kx04.png" target="_blank"></a>

2 安装完毕后我们查看一下增加了哪些模块。

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347357142k.png" target="_blank"></a>

3 查看模块带入的相关的Cmdlets和函数

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347359RE7b.png" target="_blank"></a>

4 为了保证我们能够正常管理服务器,我们先通过ILOWeb访问一下服务器:

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347363cMOv.png" target="_blank"></a>

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_14083473662nZo.png" target="_blank"></a>

5 下面开始正式的运用Powershell管理。

1)查看风扇的状态

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347368amik.png" target="_blank"></a>

为了更明确的查看我们稍微处理一下结果,可以看到服务器有四个风扇以及风扇的转速:

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_14083473699r9o.png" target="_blank"></a>

对比一下Web页面的,因为有一段时间差 相关信息有变化了:

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347373H7jr.png" target="_blank"></a>

2)接下来我们查看一下服务器的相关硬件的温度状态,这是我们日常关注和作为监控项的重要参数。

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347376hI70.png" target="_blank"></a>

对比一下web管理下的温度状态:

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347380v37M.png" target="_blank"></a>

3)查看一下电源使用状态:

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347381uOGz.png" target="_blank"></a>

4)查看ILO的全局设置

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347409lB3T.png" target="_blank"></a>

以上因为是线上的服务器做的演示所以只是通过powershell Get到的服务器的一些硬件信息,当然日常也可以通过此工具设置相关参数比如:设置管理IP,管理员等等。

如果你的HP服务器不是ILO的也可以通过Onboard Administrator(OA)的模块来管理,通过上面的下载链接也能下载到:

<a href="http://lixiaosong.blog.51cto.com/attachment/201408/18/705126_1408347409Rn2z.png" target="_blank"></a>

因为我的环境中没有此类的服务器所以我就不再做介绍了 有兴趣的可以玩玩。

我觉得这个工具更多的是供大家在一些网络监控和运维自动化的管理中应用,日常操通过Web管理更方便和直观吧。希望能给各位带来方便!

本文转自handsome7038 51CTO博客,原文链接:http://blog.51cto.com/lixiaosong/1541604