<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Egahhenry on Medium]]></title>
        <description><![CDATA[Stories by Egahhenry on Medium]]></description>
        <link>https://medium.com/@egahhenry?source=rss-4419c5e5e895------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*CiQ1UjUIYw9pn8IB</url>
            <title>Stories by Egahhenry on Medium</title>
            <link>https://medium.com/@egahhenry?source=rss-4419c5e5e895------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 16:42:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@egahhenry/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Server Monitoring to Better CEM Operations: Building a Linux Server Performance Monitoring…]]></title>
            <link>https://medium.com/@egahhenry/from-server-monitoring-to-better-cem-operations-building-a-linux-server-performance-monitoring-231a6a60fa6f?source=rss-4419c5e5e895------2</link>
            <guid isPermaLink="false">https://medium.com/p/231a6a60fa6f</guid>
            <dc:creator><![CDATA[Egahhenry]]></dc:creator>
            <pubDate>Sat, 05 Sep 2026 06:20:02 GMT</pubDate>
            <atom:updated>2026-09-05T06:20:02.829Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Server Monitoring to Better CEM Operations: Building a Linux Server Performance Monitoring Tool as a Huawei SmartCare Platform Engineer</h3><p>Working as a <strong>SmartCare Platform Engineer</strong>, one of the things I have learned is that maintaining a Customer Experience Management (CEM) platform is about much more than ensuring that an application is running.</p><p>Behind every dashboard, customer-experience metric, alarm, report, and analytics workflow is an infrastructure layer made up of servers, processes, databases, data pipelines, storage, and network services.</p><p>When something goes wrong at that layer, the impact can eventually become visible to the users and operational teams relying on the CEM platform.</p><p>That is what motivated me to build a simple <strong>Linux Server Performance Statistics Bash script</strong>.</p><p>It started as a Bash scripting exercise, but it quickly became a practical example of something I encounter regularly as a platform engineer:</p><blockquote><strong><em>Before troubleshooting an application, you need to understand the health of the infrastructure underneath it.</em></strong></blockquote><h3>What is Huawei SmartCare CEM?</h3><p>Customer Experience Management (CEM) in telecommunications is focused on understanding network and service performance from the perspective of the end user.</p><p>Huawei’s SmartCare CEM solution is designed to connect network performance, service quality, and customer experience. The platform can provide insights at different levels, from network KPIs and service quality to user experience.</p><p>This distinction is important.</p><p>Traditional network monitoring might tell you:</p><blockquote><em>“The server is running.”</em></blockquote><p>CEM asks a more meaningful question:</p><blockquote><em>“Is the customer actually receiving a good experience?”</em></blockquote><p>That requires a significant amount of data processing and infrastructure behind the scenes.</p><p>SmartCare can operate across multiple data sources and domains, with analytics used to identify service degradation and help teams determine where optimization efforts should be focused. Huawei describes this as part of the transition from traditional network-centric operations toward more service- and user-centric operations.</p><p>As a platform engineer, my role sits closer to the infrastructure that makes this possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*mDpn53cGItdv_mRkNzafzw.png" /><figcaption>A simplified view of how network data moves through collection and processing before becoming customer-experience insights</figcaption></figure><h3><strong>Why Server Health Matters in a CEM Environment</strong></h3><p>Imagine a CEM platform processing large amounts of telecom data.</p><p>If one of the underlying servers starts experiencing high CPU usage, memory pressure, disk exhaustion, or a problematic process, the consequences may not immediately appear as a server failure.</p><p>Instead, you might start seeing symptoms such as:</p><ul><li>Slow dashboards</li><li>Delayed data processing</li><li>Failed ETL jobs</li><li>Increasing processing latency</li><li>Delayed alarms</li><li>Application instability</li><li>Database performance degradation</li><li>Failed services</li><li>Increasing disk utilization</li><li>Delayed customer-experience analytics</li></ul><p>This is why infrastructure monitoring is an important part of platform operations.</p><h3>The Problem I Wanted to Solve</h3><p>During my learning and practical work with Linux environments, I wanted to build a lightweight tool that could quickly answer five questions:</p><ol><li><strong>How much CPU is the server using?</strong></li><li><strong>How much memory is being consumed?</strong></li><li><strong>How much disk space is available?</strong></li><li><strong>Which processes are consuming the most CPU?</strong></li><li><strong>Which processes are consuming the most memory?</strong></li></ol><p>Instead of manually running several commands every time, I wanted a single command that could provide a quick snapshot of server health.</p><p>The result was a Bash script called:</p><pre>server_stats.sh</pre><h3>The Solution</h3><p>The script uses standard Linux utilities to collect server performance information.</p><p>The output is organized into several sections:</p><pre>============================================================<br>                 SERVER PERFORMANCE STATS<br>============================================================</pre><pre>OS INFORMATION<br>------------------------------------------------------------</pre><pre>CPU USAGE<br>------------------------------------------------------------</pre><pre>MEMORY USAGE<br>------------------------------------------------------------</pre><pre>DISK USAGE<br>------------------------------------------------------------</pre><pre>TOP 5 PROCESSES BY CPU USAGE<br>------------------------------------------------------------</pre><pre>TOP 5 PROCESSES BY MEMORY USAGE<br>------------------------------------------------------------</pre><pre>LOGGED-IN USERS<br>------------------------------------------------------------</pre><p>The objective wasn’t to build another enterprise monitoring platform.</p><p>The objective was to create a <strong>simple operational diagnostic tool</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*rV0waFybCOnqDQWE1j5vhg.png" /><figcaption>Script major functions</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*gKbmMJAdZ6fTJyroIFZfjw.png" /><figcaption>Solution Execution Path</figcaption></figure><h3>1. Monitoring CPU Usage</h3><p>The first metric I wanted was total CPU utilization.</p><p>The script uses:</p><pre>top -bn1</pre><p>and extracts the CPU idle percentage.</p><p>The basic calculation is:</p><pre>CPU Usage = 100% - CPU Idle%</pre><p>For example:</p><pre>CPU Idle = 92.5%</pre><pre>CPU Usage = 100 - 92.5<br>          = 7.5%</pre><p>The output becomes:</p><pre>CPU USAGE<br>------------------------------------------------------------<br>Total CPU Usage: 7.50%</pre><h3>Why this matters for CEM</h3><p>High CPU utilization can indicate that a server is under heavy computational load.</p><p>In a CEM environment, this could potentially affect components responsible for:</p><ul><li>Data processing</li><li>Analytics</li><li>Application services</li><li>Reporting</li><li>Data ingestion</li><li>Background jobs</li></ul><p>CPU monitoring therefore provides an early indication that a platform component may be under stress.</p><h3>2. Monitoring Memory Usage</h3><p>The script uses:</p><pre>free -m</pre><p>to retrieve memory information.</p><p>The output is then processed with awk to calculate utilization percentages.</p><p>For example:</p><pre>MEMORY USAGE<br>------------------------------------------------------------<br>Total Memory: 7974 MB<br>Used Memory:  3210 MB (40.25%)<br>Free Memory:  1200 MB (15.05%)</pre><p>One lesson I took from this implementation is that Linux memory management is more nuanced than simply looking at “free” memory.</p><p>Linux uses unused memory for caching, meaning a server can have relatively little “free” memory while still having plenty of memory available for applications.</p><p>For a more production-oriented version, I would use the available memory metric and calculate:</p><pre>Used Memory = Total Memory - Available Memory</pre><p>This would provide a more useful indication of actual memory pressure.</p><h3>3. Monitoring Disk Usage</h3><p>The script uses:</p><pre>df -h --total</pre><p>The -h option makes the output human-readable.</p><p>Instead of:</p><pre>107374182400</pre><p>you get:</p><pre>100G</pre><p>The script produces something similar to:</p><pre>DISK USAGE<br>------------------------------------------------------------<br>Total Disk: 100G<br>Used Disk:  65G (65%)<br>Free Disk:  35G (35%)</pre><h3>Why disk monitoring is particularly important</h3><p>Disk utilization is one of those problems that can appear harmless until it isn’t.</p><p>A server reaching 100% disk utilization can cause:</p><ul><li>Applications to fail</li><li>Logs to stop writing</li><li>Databases to encounter problems</li><li>Temporary files to fail</li><li>Data processing jobs to fail</li><li>Services to become unstable</li></ul><p>For a data-intensive platform such as a CEM environment, storage monitoring is therefore critical.</p><h3>4. Finding the Top CPU-Consuming Processes</h3><p>Knowing that CPU utilization is high isn’t enough.</p><p>The next question is:</p><blockquote><strong><em>What is consuming the CPU?</em></strong></blockquote><p>The script uses:</p><pre>ps -eo pid,comm,%cpu,%mem --sort=-%cpu</pre><p>This provides:</p><ul><li>PID</li><li>Process name</li><li>CPU utilization</li><li>Memory utilization</li></ul><p>The output is then limited to the top five processes.</p><p>Example:</p><pre>TOP 5 PROCESSES BY CPU USAGE<br>------------------------------------------------------------<br>PID        PROCESS                   CPU%       MEM%<br>1234       python3                   25.4       4.2<br>2156       nginx                     12.7       1.8<br>3421       java                       8.9       12.5<br>1543       dockerd                    5.2        3.4<br>987        systemd                    2.1        0.5</pre><p>This transforms:</p><blockquote><em>“CPU is high.”</em></blockquote><p>into:</p><blockquote><em>“CPU is high because this particular process is consuming 25%.”</em></blockquote><p>That difference is extremely important during troubleshooting.</p><h3>5. Finding the Top Memory-Consuming Processes</h3><p>The same approach is used for memory.</p><p>This time, processes are sorted using:</p><pre>--sort=-%mem</pre><p>Example:</p><pre>TOP 5 PROCESSES BY MEMORY USAGE<br>------------------------------------------------------------<br>PID        PROCESS                   CPU%       MEM%<br>3421       java                       8.9       12.5<br>1234       python3                   25.4        4.2<br>1543       dockerd                    5.2        3.4<br>2156       nginx                     12.7        1.8<br>876        mysqld                     1.5        2.9</pre><p>This is particularly useful when investigating:</p><ul><li>Memory leaks</li><li>Java heap pressure</li><li>Database resource consumption</li><li>Application processes consuming excessive memory</li><li>Unexpected background processes</li></ul><h3>From Network KPIs to Infrastructure KPIs</h3><p>One interesting aspect of working around CEM is understanding that there are multiple layers of observability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*dFtOcQFNT5d8PxNXQO4aIw.png" /><figcaption>CEM Observalility Layers</figcaption></figure><p>At the network level, you may look at:</p><pre>RSRP<br>RSRQ<br>SINR<br>Throughput<br>Drop Rate<br>Latency<br>Packet Loss</pre><p>At the service level:</p><pre>Service Quality<br>KQI<br>CEI<br>Application Experience</pre><p>At the infrastructure level:</p><pre>CPU<br>Memory<br>Disk<br>Processes<br>Network<br>Database<br>Services</pre><p>All these layers ultimately contribute to the ability of the platform to deliver reliable insights.</p><p>Huawei’s SmartCare architecture has historically emphasized connecting experience indicators with lower-level network and service information, including a layered CEI-KQI-KPI approach.</p><p>This reinforces an important principle:</p><blockquote><strong><em>You cannot reliably troubleshoot customer experience without understanding the systems producing and processing the data behind that experience.</em></strong></blockquote><h3>From a Bash Exercise to a Platform Engineering Tool</h3><p>What started as a simple scripting exercise helped reinforce several concepts that are directly relevant to my work as a SmartCare Platform Engineer.</p><h3>1. Linux troubleshooting</h3><p>Platform engineers spend significant time interacting with Linux systems.</p><p>Understanding commands such as top, ps, free, and df makes troubleshooting much faster.</p><h3>2. Resource monitoring</h3><p>A service being “up” doesn’t necessarily mean that it is healthy.</p><p>You also need to understand:</p><pre>CPU<br>Memory<br>Disk<br>Processes<br>Network</pre><h3>3. Root-cause thinking</h3><p>The tool encourages a simple troubleshooting process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*NcF5hBNhUaTTuedXH2RCaA.png" /><figcaption>Troubleshooting Flow</figcaption></figure><pre>Is there a problem?<br>       ↓<br>Which resource is affected?<br>       ↓<br>Which process is responsible?<br>       ↓<br>Is the behavior expected?<br>       ↓<br>What should I investigate next?</pre><h3>4. Automation</h3><p>Instead of repeatedly typing several commands, a single script produces a standardized report.</p><p>That is one of the fundamental principles of automation:</p><blockquote><strong><em>If you repeatedly perform the same diagnostic process, consider turning it into a tool.</em></strong></blockquote><h3>Conclusion</h3><p>Building server_stats.sh was a relatively small project, but it reinforced a much bigger lesson for me as a <strong>Huawei SmartCare Platform Engineer</strong>.</p><p>Customer Experience Management is ultimately about the experience delivered to the user, but delivering reliable experience insights requires a healthy technology stack underneath it.</p><p>A CEM platform depends on:</p><ul><li>Reliable infrastructure</li><li>Healthy compute resources</li><li>Sufficient memory</li><li>Available storage</li><li>Stable processes</li><li>Reliable data pipelines</li><li>Effective monitoring</li><li>Fast troubleshooting</li></ul><p>The ability to quickly understand what is happening on a Linux server is therefore more than a system administration skill.</p><p>It is part of being an effective platform engineer.</p><p>The script is a small example of that philosophy:</p><blockquote><strong><em>Observe → Identify → Investigate → Act.</em></strong></blockquote><p>And that same mindset scales from a Bash script running on a single Linux server to large-scale telecom platforms responsible for monitoring and improving customer experience.</p><h3>The Code</h3><p>The complete server_stats.sh script is available on GitHub.</p><p><a href="https://github.com/egah923/Server-Performance-Stats">https://github.com/egah923/Server-Performance-Stats</a></p><p>The project is intentionally simple, dependency-free, and designed as a starting point for building more advanced Linux monitoring capabilities.</p><h3>Final Thoughts</h3><p>One of the things I appreciate about platform engineering is that it sits at the intersection of <strong>infrastructure, data, applications, and business outcomes</strong>.</p><p>Working around CEM makes that connection even clearer.</p><p>A CPU spike is not just a CPU spike.</p><p>A full disk is not just a storage problem.</p><p>A delayed data pipeline is not just an ETL issue.</p><p>They can eventually become <strong>customer-experience problems</strong>.</p><p>Understanding that relationship — and building tools that help identify problems before they become larger incidents — is one of the skills I continue to develop as a platform engineer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=231a6a60fa6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>