snare / ee Goto Github PK
View Code? Open in Web Editor NEWA wrapper for dd
A wrapper for dd
I am trying ee on Linux with dd 8.21 and I received some strange error:
$ python -m ee.main if=/dev/zero of=/dev/null count=1024 bs=512k
Traceback (most recent call last): in 0.01 seconds (5.60KB/sec)
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/ee/ee/main.py", line 193, in <module>
main()
File "/tmp/ee/ee/main.py", line 189, in main
do_dd(args, bs, insize)
File "/tmp/ee/ee/main.py", line 130, in do_dd
(bytes, sec, rate) = parse_status(bytes_tx)
File "/tmp/ee/ee/main.py", line 144, in parse_status
bytes = int(a[0])
ValueError: invalid literal for int() with base 10: '1023+1'
So, I printed out the a
:
['1023+1', 'records', 'out']
It looks like there is difference between dd
on Linux and Mac OS X, I assumed since it's mentioned in README.
From dd(1)
on Linux:
Sending a USR1 signal to a running 'dd' process makes it print I/O statistics to standard error and then resume copying.
$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid
18335302+0 records in 18335302+0 records out 9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s
Here is I ran the commands in Bash:
$ dd if=/dev/zero of=/dev/null& pid=$!
[1] 7767
$ kill -USR1 $pid; sleep 1; kill $pid
2156552+0 records in
2156552+0 records out
1104154624 bytes (1.1 GB) copied, 1.30992 s, 843 MB/s
[1]+ Terminated dd if=/dev/zero of=/dev/null
Also there doesn't seem to have m
suffix as used in README on Linux:
$ python -m ee.main if=/dev/zero of=/dev/null count=1024 bs=512m
dd: invalid number ‘512m’
$ python -m ee.main if=/dev/zero of=/dev/null count=1024 bs=512M
[runs but thorws the error above
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.