zoukankan      html  css  js  c++  java
  • uptime

    查看系统运行时间:

    上午拔了一颗牙,到现在才上服务器,结果发现服务器重启了,奇怪的是竟然到现在也没人尝试登录服务器。

    cat /proc/uptime| awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("系统已运行:%d天%d时%d分%d 秒",run_days,run_hour,run_minute,run_second)}' 

          

    uptime: uptime  gives  a  one  line display of the following information.  The current time, how long the system has been
                 running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

    字符串转数组: swapfield=($swapfiled)

  • 相关阅读:
    函数参数
    字符编码
    本周内容
    int,float,str,list,dict,元组
    python 基础变量
    Python学习(小笔记一)
    🌐 网络管理
    📓 LVM相关
    📹 进程管理(二)
    🎬进程管理
  • 原文地址:https://www.cnblogs.com/openix/p/3478351.html
Copyright © 2011-2022 走看看