Před 4 dny jsem provedl reboot a do dneška byl klid. Dnes jsem byl svědkem, jak rostlo postupně zatížení až na cca 60%, tak jsem zkusil zákázat jedno nějaký pravidlo ve FW a ihned to kleslo na 3%. Podotýkám, že to bylo pravidlo na povolení PPTP.
cca 3 hodiny byl klid, teď zase postupnej nárůst CPU, zakázal jsem a povolil jiný pravidlo - povolení NTP.
Tohle mě hlava nebere.. pokud v době takového vytížení udělám jakoukoli změnu ve FW, zatížení okamžitě klesne..
Někdo nějakej nápad? Karta je 4 portovka od Supermicra, verze RoS 6.36
Dik za info, skusil som to aj u seba. a ejhla... robi mi to tiez, namatkovo som vypol par najviac aktualne vytazenych filter pravidiel pre input/output, forward a slo to z 50% na 15-20%. Ma picne z toho MK.
ver 6.34.6 x86
hehe, idem pozapinat vsetky NAty, pojde mi cpu servera na 60-70% a skusim potom, ci popripade taku koninu, ako vytvorit bezvyznamne pravidlo vo filtri a kazdych 10s ho schedulerom zap/vyp. OMG : : :
tak jsem to udelal ja... scriptem+shedulerem co 5sec
# Average CPU Load Notification.
# This will email you once when average CPU Load reaches the set CPU Threshold value.
# When average CPU Load drops back below CPU Threshold the email notification is reset.
# Set up the scheduler to run this at 1-5 second intervals (Sample Rate).
# Original credit goes to rgraham - modified by hartz.
# Threshold is the value that will activate the alert when reached by average CPU Load (1-100)
:local cputhreshold 30;
# Arraysize is the number of CPU Load samples to keep.
# Experiment with this value to incease or decrease the number of samples.
# The greater the value the longer the time that the cpu-load average is calculated for.
:local arraysize 10;
# Misc variables for stuff and things.
:local cpuload 0;
:local arraylen 0;
:local arraypos 0;
:local arraytot 0;
:global avgcpuload 0;
:global cpuarray;
:global highavgcpuload;
:global cpualertemail;
# Get CPU Load samples, limit cpuarray to array size.
:set cpuload [/system resource get cpu-load];
:set cpuarray ( [:toarray $cpuload] + $cpuarray );
:set cpuarray [:pick $cpuarray 0 $arraysize];
# Add up all values in array.
:set arraypos 0;
:set arraylen [:len $cpuarray];
:while ($arraypos < $arraylen) do={
:set arraytot ($arraytot + [:pick $cpuarray $arraypos] );
:set arraypos ($arraypos +1)}
# Divide sum of array values by the number of values in cpuarray.
:set avgcpuload ($arraytot / [:len $cpuarray]);
:if ([:len $highavgcpuload] = 0) do={:set highavgcpuload $avgcpuload}
:if ([$highavgcpuload] < [$avgcpuload]) do={:set highavgcpuload $avgcpuload}
# Display results in Terminal window.
:log info ("CPU Load Captures:");
:log info $cpuarray;
:log info ("Array Total: $arraytot");
:log info ("Array size: $arraysize");
:log info ("CPU Load - Avg: $avgcpuload High: $highavgcpuload");
# Send alert email.
:if ($avgcpuload >= $cputhreshold) do={
:if ($cpualertemail != "true") do={
ip firewall filter set disabled=yes numbers=43
ip firewall filter set disabled=no numbers=43
# Build message body.
:local body "";
:set body ($body."Uptime: ".[/system resource get value-name="uptime"]."\r\n");
:set body ($body."Memory Total / Free: ".[/system resource get value-name="total-memory"] / "1024" / "1024"."MB / ".[/system resource get value-name="free-memory"] / "1024" / "1024"."MB\r\n");
:set body ($body."CPU Load: ".[/system resource get value-name="cpu-load"]."%\r\n");
:set body ($body."CPU Average: ".$avgcpuload."%\r\n");
:set body ($body."CPU High: ".$highavgcpuload."%\r\n");
:set body ($body."CPU Alert Threshold: ".$cputhreshold."%\r\n");
:set body ($body."Connections: ".[/ip firewall connection print count-only]."\r\n");
:set highavgcpuload;
# Send email and set variable so no further alerts are sent until average goes below threshold.
/tool e-mail send to="tvuj@email" subject=([/system identity get name]." CPU alert triggered at ".[/system clock get date]) body=$body;
:set cpualertemail "true";
}
} else={
# Reset alert if average is less than threshold.
:set cpualertemail "false";
}