49 lines
1.6 KiB
JSON
49 lines
1.6 KiB
JSON
{
|
|
"id": "2373b66a-092d-44cb-bfd7-82e86e7a3b4d",
|
|
"snapshot": "multiapps",
|
|
"instruction": "I want to understand the resource usage of my Ubuntu system under normal workloads. Please use the `sar` command in the `sysstat` toolkit to monitor the system CPU usage, evaluate the status once every second for 30 seconds, output the results to \"System_Resources_Report.txt\" under Desktop, and convert the txt to csv file with the same name.",
|
|
"source": "author",
|
|
"config": [
|
|
{
|
|
"type": "command",
|
|
"parameters":{
|
|
"command": "echo password | sudo -S apt-get update && echo password | sudo -S apt-get install sysstat",
|
|
"shell": "true"
|
|
}
|
|
}
|
|
],
|
|
"trajectory": "trajectories/",
|
|
"related_apps": [
|
|
"os", "calc"
|
|
],
|
|
"evaluator": {
|
|
"func": ["file_contains", "check_csv_line_number"],
|
|
"result":
|
|
[
|
|
{
|
|
"type": "vm_file",
|
|
"path": "/home/user/Desktop/System_Resources_Report.txt",
|
|
"dest": "System_Resources_Report.txt"
|
|
},
|
|
{
|
|
"type": "vm_file",
|
|
"path": "/home/user/Desktop/System_Resources_Report.csv",
|
|
"dest": "System_Resources_Report.csv"
|
|
}
|
|
],
|
|
"expected":
|
|
[
|
|
{
|
|
"type": "rule",
|
|
"rules" :{
|
|
"expected": ["tps", "rtps", "wtps", "dtps", "bread/s", "bwrtn/s", "bdscd/s", "Average", "Linux"]
|
|
}
|
|
},
|
|
{
|
|
"type": "rule",
|
|
"rules": {
|
|
"expected": "33"
|
|
}
|
|
}]
|
|
}
|
|
} |