Template:ProgrammersResorces: Difference between revisions

From DiLab
Jump to navigation Jump to search
Content deleted Content added
Line 32: Line 32:
* [https://www.linux.com/learn/tutorials/470979-who-and-what-is-on-my-network-probing-your-network-with-linux Tīkla analīze]
* [https://www.linux.com/learn/tutorials/470979-who-and-what-is-on-my-network-probing-your-network-with-linux Tīkla analīze]
** Tīkla caurplūdes testi
** Tīkla caurplūdes testi
⚫
$ mtr -rw -c 100 <server_ip>
⚫

$ yes | pv | ssh user@example.com "cat > /dev/null"
$ yes | pv | ssh user@example.com "cat > /dev/null"
97,3MiB 0:01:36 [1,28MiB/s][ <=> ]
97,3MiB 0:01:36 [1,28MiB/s][ <=> ]

⚫
$ mtr -rw -c 100 <server_ip>
HOST: <myhost> Loss% Snt Last Avg Best Wrst StDev
1.|-- _gateway 0.0% 100 0.7 0.6 0.3 2.4 0.2
2.|-- <server_ip> 1.0% 100 1.0 4.3 0.9 26.6 5.7


$ iperf3 -s # startē serveri vienā galā
$ iperf3 -s # startē serveri vienā galā
Line 54: Line 56:


$ nstat -az | grep -Ei "drop|overflow|retrans"
$ nstat -az | grep -Ei "drop|overflow|retrans"
TcpRetransSegs 127923 0.0
TcpExtLockDroppedIcmps 0 0.0
TcpExtListenDrops 1 0.0
TcpExtListenDrops 1 0.0
TcpExtTCPLostRetransmit 11837 0.0
TcpExtTCPLostRetransmit 11837 0.0
...
...


$ ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
⚫
...


$ sudo ethtool -S eth0 | grep -E "errors|dropped|fifo|collision"
collisions: 0
rx_crc_errors: 0
rx_missed_errors: 0
tx_aborted_errors: 0
tx_carrier_errors: 0
...


* "bashtop" rīks veiktspējas analīzei
* "bashtop" rīks veiktspējas analīzei

Revision as of 08:21, 6 May 2026

Programmētāja resursi

Programmēšanas analīzes rīki

  • PMD - scans source code and looks for bugs, dead code, suboptimal code, overcomplicated expressions, duplicate code.

Linux veiktspējas analīze

$ yes | pv | ssh user@example.com "cat > /dev/null"
     97,3MiB 0:01:36 [1,28MiB/s][         <=>    ]
$ mtr -rw -c 100  <server_ip>
     HOST: <myhost>     Loss%   Snt   Last   Avg  Best  Wrst StDev
     1.|-- _gateway      0.0%   100    0.7   0.6   0.3   2.4   0.2
     2.|-- <server_ip>   1.0%   100    1.0   4.3   0.9  26.6   5.7
$ iperf3 -s    # startē serveri vienā galā
     Server listening on 5201
$ iperf3 -c <server_ip>    # startē klientu otrā galā
     Connecting to host <server_ip>, port 5201
     [  5] local 192.168.1.123 port 51846 connected to <server_ip> port 5201
     [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
     [  5]   0.00-1.00   sec  1.42 MBytes  11.9 Mbits/sec    0   89.1 KBytes       
     [  5]   1.00-2.00   sec  1.62 MBytes  13.6 Mbits/sec    0    147 KBytes       
     ...
     [  5]   9.00-10.00  sec  2.30 MBytes  19.3 Mbits/sec    0    595 KBytes       
     - - - - - - - - - - - - - - - - - - - - - - - - -
     [ ID] Interval           Transfer     Bitrate         Retr
     [  5]   0.00-10.00  sec  14.2 MBytes  11.9 Mbits/sec    0             sender
     [  5]   0.00-10.42  sec  11.6 MBytes  9.36 Mbits/sec                  receiver
$ nstat -az | grep -Ei "drop|overflow|retrans"
     TcpRetransSegs                  127923             0.0
     TcpExtLockDroppedIcmps          0                  0.0
     TcpExtListenDrops               1                  0.0
     TcpExtTCPLostRetransmit         11837              0.0
     ...
$ ethtool eth0
     Settings for eth0:

Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full

     ...
$ sudo ethtool -S eth0 | grep -E "errors|dropped|fifo|collision"
     collisions: 0
     rx_crc_errors: 0
     rx_missed_errors: 0
     tx_aborted_errors: 0
     tx_carrier_errors: 0
     ...
  • "bashtop" rīks veiktspējas analīzei

Āķīgi uzdevumi un pieredze

Atziņas