-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: general improvements to os.md copy #7124
Conversation
* `nice` {number} A number of milliseconds the CPU has spent in nice. | ||
* `sys` {number} A number of milliseconds the CPU has spent in sys. | ||
* `idle` {number} A number of milliseconds the CPU has spent in idle. | ||
* `irq` {number} A number of milliseconds the CPU has spent in irq. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, from proc(5)
for Linux:
user (1) Time spent in user mode.
nice (2) Time spent in user mode with low priority (nice).
system (3) Time spent in system mode.
idle (4) Time spent in the idle task. This value should be USER_HZ times the second entry in the /proc/uptime pseudo-file.
iowait (since Linux 2.5.41)
(5) Time waiting for I/O to complete.
irq (since Linux 2.6.0-test4)
(6) Time servicing interrupts.
softirq (since Linux 2.6.0-test4)
(7) Time servicing softirqs.
[…]
I’d expect these values to mean similar things on other OS, so it might be worth using descriptions based on these?
Updated :-) |
@@ -2,25 +2,35 @@ | |||
|
|||
Stability: 2 - Stable | |||
|
|||
Provides a few basic operating-system related utility functions. | |||
The `os` module provides a number of operating-system related utility methods. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/operating-system related/operating system-related/
Updated |
The `os.platform()` method returns a string identifying the operating system | ||
platform as set during compile time of Node.js. | ||
|
||
Currently possible values are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the current list of valid operating systems in configure
and the name changes in node.gyp
, this list should be:
- aix
- android
- darwin
- freebsd
- linux
- openbsd
- sunos
- win32
Updated! PTAL |
Returns the operating system name. For example `'Linux'` on Linux, `'Darwin'` | ||
on OS X and `'Windows_NT'` on Windows. | ||
The `os.type()` method returns the a string identifying the operating system | ||
name as returned by uname(3). For example `'Linux'` on Linux, `'Darwin'` on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uname(3)
should have a posix link like other such man page links now have in the docs.
e.g. in the fs docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Man page references are automatically converted to links by the doctool, so there’s no real need for that.
ping @nodejs/documentation |
The properties included on each object include: | ||
|
||
* `model` {String} | ||
* `speed` {number} (in MHz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen capitalization differing in various parts of all of the docs. Should we stick to capitals or no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm planning to make a second pass to improve the consistency of argument types. For now I'm focusing primarily on making sure that arguments are even listed in the first place.
Updated! |
|
||
## os.EOL | ||
<!-- YAML | ||
added: v0.7.8 | ||
--> | ||
|
||
A constant defining the appropriate End-of-line marker for the operating | ||
system. | ||
A string constant defining the operating-system specific end-of-line marker: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/operating-system specific/operating system-specific/
@mscdex ... updated! |
Returns the operating system CPU architecture. Possible values are `'x64'`, | ||
`'arm'` and `'ia32'`. Returns the value of [`process.arch`][]. | ||
The `os.arch()` method returns a string identifying the operating system CPU | ||
architecture *on which the Node.js binary was compiled*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/on/for/
Updated |
LGTM |
PR-URL: #7124 Reviewed-By: Brian White <[email protected]>
Landed in ecc48a1. Thank you! |
PR-URL: #7124 Reviewed-By: Brian White <[email protected]>
PR-URL: #7124 Reviewed-By: Brian White <[email protected]>
Checklist
Affected core subsystem(s)
doc (os)
Description of change
General improvements to os.md copy
@nodejs/documentation