You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will give the time consumed by each method in ascending order. If a method with a high time consumption is identified, then take the 5 most time consuming service and database calls, with the same correlation ID of the method logs, and find out the unusually time consuming call.
type correlation.log | findstr "<correlation_ID>" | findstr "|HTTP" | sort
823
+
type correlation.log | findstr "<correlation_ID>" | findstr "|jdbc|" | sort
824
+
type correlation.log | findstr "<correlation_ID>" | findstr "|ldap|" | sort
825
+
```
804
826
805
827
!!! note
806
828
If a method with a high time consumption cannot be identified, but still a high latency is observed, the following command can be executed to find the highest time recorded.
807
829
808
-
``` java
809
-
cat correlation.log | cut -d “|” -f4 | sort -n
830
+
=== "Linux/Mac OS"
831
+
```bash
832
+
cat correlation.log | cut -d "|" -f4 | sort -n
833
+
```
834
+
835
+
=== "Windows"
836
+
```powershell
837
+
type correlation.log | for /f "tokens=4 delims=|" %a in ('more') do @echo %a | sort
810
838
```
811
839
Then the entry that bears the highest duration can be found by searching the file for this time.
812
840
813
-
``` java
841
+
=== "Linux/Mac OS"
842
+
```bash
814
843
cat correlation.log | grep "<highest_time>"
815
844
```
816
845
846
+
=== "Windows"
847
+
```powershell
848
+
type correlation.log | findstr "<highest_time>"
849
+
```
850
+
817
851
!!! tip
818
852
Alternatively, a log analyzing tool can be used as well to derive this information.
0 commit comments