איך מתקינים net stat כדי לבדוק עומס שרת וכו'?

סיכום מבוסס בינה מלאכותית

The discussion centers around installing netstat within a Discourse container to investigate increased server load. agemo initially tried using apt install net-tools within the container but it failed. jahan_gagan explained that packages cannot be installed interactively and must be included in the app.yml file during container rebuild using ./launcher rebuild app. agemo admits unfamiliarity with modifying app.yml and asks for a guide. Falco suggests installing netstat on the host OS instead of the container, as server load checks are better performed at that level. agemo clarifies their understanding, questioning whether the host refers to the OS level, and links a related Meta post about potential overload issues https://meta.discourse.org/t/discourse-overloaded-real-traffic-or-ddos-100-cpu-usage-despite-of-decent-traffic-and-high-specs-server/203976. Ed_S reinforces the suggestion to monitor from the host level, emphasizing the container’s role as an isolated environment where internal issues should not affect the host and host-level monitoring provides a complete view.

נכנסתי לאפליקציה ./launcher enter app והרצתי את הפקודה

apt install net-tools

אני בדרך כלל משאיר את ההגדרות כמו שהן, אבל אני צריך לבדוק את עומס השרת, אז הנחתי שאני צריך להיכנס לאפליקציה ולהריץ netstat, אבל כנראה שזה לא מותקן כברירת מחדל וגם אני לא יכול להתקין אותו.

זו שאלה די חובבנית, אני יודע שאני מפספס משהו ברור כאן.

מכולות Discourse בנויות באמצעות תבנית app.yml, ויש להתקין את כל החבילות הנדרשות במהלך תהליך בניית התמונה (כלומר, בעת הפעלת ./launcher rebuild app). לא ניתן להתקין חבילות באופן אינטראקטיבי מתוך מכולה פועלת.

כתוצאה מכך, כלים נפוצים כמו net-tools (המספק את netstat) בדרך כלל אינם כלולים ולא ניתן להוסיף אותם בקלות לאחר שהמכולה פועלת.

אם אתה צריך netstat בתוך המכולה, תצטרך להוסיף net-tools ל-app.yml שלך ואז לבנות מחדש את המכולה.

אני מבין ותודה על התובנה הזו.

ובכן, זו הסיבה שאני פחות או יותר משאיר דברים שם לבד. אני לא כל כך מכיר את זה בכלל, רק תוספים והתאמה אישית של app.yml בסיסי.

האם יש מדריך במטא שמכסה הרפתקאות app.yml נרחבות יותר?

למה לא להתקין את זה במארח במקום בקונטיינר? אם אתה רוצה לבדוק את עומס השרת, הגיוני לעשות את זה ברמת המארח.

When you say host do you mean the OS / linux level?

I have netstat on Ubuntu OS but I thought I needed it in the container (where all the magic happens right, with nginx etc) if I understand things correctly.

As was trying to gauge if our droplet is having a similar even the same issue as this other user case Discourse overloaded real traffic or DDOS? 100% CPU usage despite of decent traffic and high specs server

אכן, עליך להתקין ניטור ברמה החיצונית. חשוב על הקונטיינר (container) כהכלה: הרעיון הוא שדברים בתוך הקונטיינר לא יכולים לשבור דברים שבחוץ. אבל הרמה החיצונית יכולה לראות כל מה שקורה בפנים. כל תעבורת הרשת, פעילות המעבד (CPU), לחץ הזיכרון.