الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

uptime

Show how long the system runs, how many users are logged in and the load average.

المستوى
لينكس اليومي
المجموعة
العمليات والمهام
يحتاج root
لا
الحزمة
procps-ng

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

ماذا يفعل

The load average is the number of processes that run or wait (for CPU or disk), as an average over 1, 5 and 15 minutes. Compare it with the number of CPU cores (nproc): a load of 4 on 2 cores means processes wait.

طريقة الكتابة

uptime [OPTION]...

الخيارات 4

الأكثر استخدامًا

-p, --pretty
Only the run time, in words.
-s, --since
The date and time of the boot.
-h, --help
Show help.
-V, --version
Show the version.

أمثلة 10

$ مستخدم عادي# بصلاحية root (أو مع sudo)

  1. 1Default output

    uptime
     10:52:01 up  2:54,  2 users,  load average: 0.15, 0.10, 0.09

    Time, run time, users, load 1/5/15 minutes.

  2. 2Run time in words

    uptime -p
    up 2 hours, 54 minutes

    Easy to read.

  3. 3Boot time

    uptime -s
    2026-10-25 07:58:12

    Did the server reboot in the night?

  4. 4Load per core

    echo "$(cut -d' ' -f1 /proc/loadavg) / $(nproc)" | bc -l

    Over 1.0 = more work than cores.

  5. 5Raw load data

    cat /proc/loadavg
    0.15 0.10 0.09 1/182 4410

    Also running/total processes and the last PID.

  6. 6Watch the load

    watch -n 5 uptime

    The 1-minute value reacts first.

  7. 7On many servers

    for h in server1 server2; do echo -n "$h: "; ssh $h uptime; done

    Quick overview.

  8. 8Unexpected reboot? (security)

    uptime -s; last -x reboot | head -3

    Compare with the change calendar.

  9. 9Same line in w and top

    w | head -1

    w and top show the uptime line first.

  10. 10Alert on high load in a script

    awk -v c=$(nproc) '$1 > c {print "high load: " $1}' /proc/loadavg

    Simple check for cron.

الملفات

/proc/uptime
Seconds since boot.
/proc/loadavg
Load averages.

رموز الخروج

0Done.
1Error.

الدليل الكامل

هذه الصفحة تشرح الأمر بكلمات بسيطة. الدليل الأصلي فيه كل التفاصيل.

في الطرفية: man uptime