File: test_export_csv.sh

package info (click to toggle)
glances 4.5.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,384 kB
  • sloc: python: 23,159; makefile: 470; sh: 430; javascript: 374
file content (13 lines) | stat: -rwxr-xr-x 490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

# Exit on error
set -e

# Run glances with export to CSV file, stopping after 10 writes
# This will run synchronously now since we're using --stop-after
echo "Glances starts to export system stats to CSV file /tmp/glances.csv (duration: ~ 20 seconds)"
rm -f /tmp/glances.csv
.venv/bin/python -m glances --export csv --export-csv-file /tmp/glances.csv --stop-after 10 --quiet

echo "Checking CSV file..."
.venv/bin/python ./tests-data/tools/csvcheck.py -i /tmp/glances.csv -l 9