Not passing Module 2 assessment- Help Needed

I’m not able to pass assessment for both memory and cpu tasks in Module 2. Been trying it since yesterday. The desired output is coming in the terminal when running manually but not in the assessments.
for memory - I’m extracting the value present next ot “MemTotal”
for cpu - I’m extracting the value present next to “cpu MHz” as integer and only considering for 1st core in multicore processor.
Commands used - “cat” & “awk”

Logfile output:-
2020-02-03 13:34:31,092 unitTesting INFO Running command_runner
2020-02-03 13:34:31,113 unitTesting INFO Module setup complete!
2020-02-03 13:34:31,120 unitTesting INFO Starting assessment…
2020-02-03 13:34:31,125 unitTesting INFO Assessing check_QBox_server_cpu.sh
2020-02-03 13:34:31,627 unitTesting ERROR /shashank-bairy04-ME_QBOX-e439e8a6-4689-11ea-a69c-2954b29597c5/execution_dir/check_QBox_server_cpu.sh /proc/cpuinfo returncode > 0! Check your code.
2020-02-03 13:34:31,639 unitTesting INFO File: check_QBox_server_cpu.sh | Status: TEST_STATUS_FAILURE
2020-02-03 13:34:31,645 unitTesting INFO Assessing check_QBox_server_memory.sh
2020-02-03 13:34:32,119 unitTesting ERROR /shashank-bairy04-ME_QBOX-e439e8a6-4689-11ea-a69c-2954b29597c5/execution_dir/check_QBox_server_memory.sh /proc/meminfo returncode > 0! Check your code.
2020-02-03 13:34:32,132 unitTesting INFO File: check_QBox_server_memory.sh | Status: TEST_STATUS_FAILURE
2020-02-03 13:34:32,137 unitTesting INFO Assessing check_QBox_server_OS.sh
2020-02-03 13:34:32,730 unitTesting INFO File: check_QBox_server_OS.sh | Status: TEST_STATUS_SUCCESS
2020-02-03 13:34:32,740 unitTesting INFO Skipping module test: check_QBox_server_disk_space.sh
2020-02-03 13:34:32,744 unitTesting INFO Assessment finished!
2020-02-03 13:34:32,750 unitTesting INFO Starting cleanup…

Please tell if I’m doing anything wrong. Thank you.

@ba1ry did you execute all sh files in your terminal successfully before pushing?

Yeah. All the files were executing properly in terminal. But cpu and memory task is not passing the assignment. Haven’t hardcoded anything.

@ba1ry did you strip out the decimal in cpu task?

@divyanshu yeah, have already done it

I recommend you checking your code once again @ba1ry .

Have checked a lot of times. Still not able to figure out.
Can anyone from the Crio Team please look at this? Will be helpful

Hey @ba1ry There Are Can Be These Reasons By which your Assessment Is Failing

  1. You are not extracting value in Integer Format
  2. You are making syntax mistake into you shall Script File
  3. You Have Hardcoded Some values
  4. You are not using right command to extract values

Hey @amanagar , thanks for the response. I’ve followed all the points that you have listed out but still doesn’t work. Can you please check my code in files ‘check_QBox_server_memory.sh’ and ‘check_QBox_server_cpu.sh’ once? Would be of great help.