[SERVER-26349] Support running dmesg -T on platforms that require sudo Created: 27/Sep/16  Updated: 05/Apr/17  Resolved: 16/Feb/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.2.8, 3.3.9
Fix Version/s: 3.5.4

Type: Bug Priority: Minor - P4
Reporter: Robert Guo (Inactive) Assignee: Yves Duhem
Resolution: Done Votes: 0
Labels: tig-evgconfig
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-24211 Addition of oom killed processes to t... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG 2017-03-06
Participants:

 Description   

We run dmesg -T > /dev/null 2>&1 instead of $sudo dmesg -T > /dev/null 2>&1 to see if human readable timestamps are supported.

# Print out any Out of Memory killed process messages.
- command: shell.exec
  params:
    system_log: true
    working_dir: src # Temporary files created in src will be cleaned up in "pre".
    script: |
      ${set_sudo}
      # Use dmesg -T option, if supported, to display timestamps.
      dmesg=dmesg
      dmesg -T > /dev/null 2>&1
      if [ $? -eq 0 ]; then
        dmesg="dmesg -T"
      fi
      $sudo $dmesg 2> /dev/null > dmesg.txt
      if [ $? -ne 0 ]; then
        echo "Cannot check for OOM (Out of memory) killed processes on this platform"
        exit 0
      fi
      egrep -i '(Out of memory|OOM[- ]killer|Killed process)' dmesg.txt > oom.txt
      if [ -s oom.txt ]; then
        echo "OOM (Out of memory) killed processes detected"
        cat oom.txt
      else
        echo "No OOM (Out of memory) killed processes detected"
      fi



 Comments   
Comment by Githook User [ 16/Feb/17 ]

Author:

{u'username': u'syev', u'name': u'Yves Duhem', u'email': u'yves.duhem@mongodb.com'}

Message: SERVER-26349 Run dmesg -T with sudo
Branch: master
https://github.com/mongodb/mongo/commit/3f44389ad1e2e620f88ab5aa8f44ead87d35dc5a

Generated at Thu Feb 08 04:11:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.