Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Jun 3, 2016

Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc (os)

Description of change

General improvements to os.md copy

@nodejs/documentation

@jasnell jasnell added doc Issues and PRs related to the documentations. os Issues and PRs related to the os subsystem. labels Jun 3, 2016
* `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.
Copy link
Member

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?

@jasnell
Copy link
Member Author

jasnell commented Jun 3, 2016

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.
Copy link
Contributor

@mscdex mscdex Jun 3, 2016

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/

@jasnell
Copy link
Member Author

jasnell commented Jun 3, 2016

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:
Copy link
Contributor

@mscdex mscdex Jun 3, 2016

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

@jasnell
Copy link
Member Author

jasnell commented Jun 3, 2016

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
Copy link
Contributor

@Fishrock123 Fishrock123 Jun 3, 2016

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.

Copy link
Member

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.

@jasnell
Copy link
Member Author

jasnell commented Jun 6, 2016

ping @nodejs/documentation

The properties included on each object include:

* `model` {String}
* `speed` {number} (in MHz)
Copy link
Contributor

@mscdex mscdex Jun 6, 2016

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?

Copy link
Member Author

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.

@jasnell
Copy link
Member Author

jasnell commented Jun 9, 2016

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:
Copy link
Contributor

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/

@jasnell
Copy link
Member Author

jasnell commented Jun 21, 2016

@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*.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/on/for/

@jasnell
Copy link
Member Author

jasnell commented Jun 21, 2016

Updated

@mscdex
Copy link
Contributor

mscdex commented Jun 21, 2016

LGTM

jasnell added a commit that referenced this pull request Jun 21, 2016
@jasnell
Copy link
Member Author

jasnell commented Jun 21, 2016

Landed in ecc48a1. Thank you!

@jasnell jasnell closed this Jun 21, 2016
Fishrock123 pushed a commit that referenced this pull request Jun 27, 2016
@Fishrock123 Fishrock123 mentioned this pull request Jun 27, 2016
Fishrock123 pushed a commit that referenced this pull request Jul 5, 2016
@Fishrock123 Fishrock123 mentioned this pull request Jul 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. os Issues and PRs related to the os subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants