当前位置:网站首页>主机信息采集脚本
主机信息采集脚本
2022-07-21 05:21:00 【锐^_^】
主机信息采集脚本
#!/bin/bash
echo 主机名:$HOSTNAME
IPADDR=`ifconfig | egrep -A 2 "^ens[0-9][0-9]|eth[0-9]" |egrep "inet[^0-9]" |awk '{print $2}'`
echo 主机IP地址: $IPADDR
SN=`dmidecode -t system | grep 'Serial Number'`
echo 服务器序列号为:$SN
RH=`cat /etc/redhat-release`
echo 操作系统版本:$RH
CPUS=`lscpu | awk '/Socket/{print $2}'`
echo cpu核数:$CPUS
~
边栏推荐
- First root, middle root, and last root traversal of binary tree
- Complete IP protocol number
- 2.Ansible中常用模塊
- regular expression
- Stata used in jupyter
- 93. 递归实现组合型枚举
- Leakage current, no grounding protection measures... 1296 imported electric kettle have major potential safety hazards
- Steps for adding dependencies to idea:
- Text file import database for getting started with kettle
- Migrate repo managed code to Gerrit
猜你喜欢
DNS域名解析
奇怪的响应数据
I spent 6000 to sign up for the test training class. Three months later, I successfully "cheated" into Tencent with a monthly salary of 17k
Deploy tidb in multiple data centers in the same city
虛擬機的封裝
The communication process and principle of peer-to-peer host are very simple
Assembly language homework
5台机器搭建HA步骤与注意事项
Comprehensive experiment of static routing
[untitled] this year's noteworthy God book, Douban scored as high as 9.0, and Jingdong Dangdang is available for sale
随机推荐
Exness: the US index fell for three consecutive days, and the euro rebounded to digest the expectation of interest rate hike
Amazon cloud technology training and Certification Course in August is wonderful and can't be missed!
使用JasperReports时,报出 ReportExpressionEvaluationData 异常
form表单标签
Steps for adding dependencies to idea:
高软课程总结
3.使用Ansible中的playbook
Intranet detection 1- working group information collection & intra domain information collection
[secondary development of GeoServer] development of rest automatic deployment module based on GeoServer Manager
12. User microservice
Markdown and idea shortcut keys
table表格
[email protected] interactive
FigDraw 16. Dendrogram of SCI article drawing
Zabbx6.0(生产实战)
JasperReports不兼容高版本itext引发的异常
Intranet detection 2-powershell collects domain information & sensitive data / data / information collection and sorting
归并排序
DataX environment deployment and test cases
The last step of QA robot implementation -- Code encapsulation and interface provision