---
name: "nws_extract"
section: "1"
platform: "linux"
package: "nws"
version: "2.13-6.1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/nws_extract"
---

# nws\_extract(1)

extracts measurements and forecast from the Network Weather Service

## NAME

nws\_extract - extracts measurements and forecast from the  Network Weather Service

## SYNOPSIS

**nws\_extract** \[-aS\]\[-f fieldList\]\[-h n\]\[-M host\]\[-n n\]\[-N host\]\[-t n\]\[-w\] resource \[filter\] host \[host ...\]

## DESCRIPTION

This manual page explains the  **nws\_extract** program. You can use  **nws\_extract** to access the NWS measurements and forecasts (see  **EXAMPLES** for few examples).

This program extracts measurement data that had been generated by a  **[nws\_sensor(1)](/nws_sensor/1.md)** instance and then stored by a **[nws\_memory(1)](/nws_memory/1.md)** istance. We suggest that to take full advantage of NWS, you should start a **[nws\_nameserver(1)](/nws_nameserver/1.md)** and multiple sensors.

## OPTIONS

- **-a**

  **Treat all listed machines as experiment sources. By default, the program** treats the first machine as the experiment source and the others as experiment destinations. Use this switch to get information about all pairs of machines.

- **-f** *fieldlist*

  Specifies which information you would like displayed. fieldList is a comma-delimited list of forecast field names that you would like to see. The recognized names are

  **destination**

  the destination host (meaningful only for multi-host measurements as latency and bandwidth)

  **source**

  the source host

  **resource**

  the name of the resource measured

  **measurement**

  the values measured by the  **[nws\_sensor(1)](/nws_sensor/1.md)**

  **time**

  the time at which the measurement is taken (as measured by the **[nws\_sensor(1)](/nws_sensor/1.md)**

  **mae\_error, mae\_forecast, mse\_error, mse\_forecast, mse\_method**

  these are the various forecasts, the computed errors and the method used in the computation (where mae is mean absolute error and mse is mean squared error).

  **option**

  if the series has been discovered thorugh the nameserver (that is using the *-N* option) you can use this fields to print the options used to start the activity responsible for this series (useful if you have series that differ only for the options).

- **-N** *host*

  use *host* as the NWS nameserver to contact to discover if and where the data are available.

- **-M** *host*

  use *host* as the NWS memory to contact to retrieve the NWS measurements. When this options is set, no NWS nameserver is contacted (that is -N is discarded if specified).

- **-w**

  continuosly display informations. The new informations are displaied as soon as the sensors register them. You need to ctrl-C to stop the program.

- **-h n**

  Specifies the frequency of the header.

- **-n howmany**

  display  *howmany* lines of output (by default 20 lines).

- **-t time**

  display data starting from *time* instead of from the most recent going back how many line you asked for (by default 20 lines).

- **-S**

  there is no resource/filter/host(s) but only series name. The series are not checked against a nameserver (-N options isn't used) but a memory needs to be specified (-M required).

**resource**

specifies which kind of measurements you want.  *resource* is typically (but may depends on compile options) bandwidthTcp, latencyTcp, availableCPU, currentCPU (to get the list of available resources for a specific host you can use **[nws\_search(1)](/nws_search/1.md)** with a filter like '&(objectclass=nwsActivity)(name=host\*)' where  *host* is the host you are interested in.

**filter**

this is to be used in conjunction with the -N options. It specifies a filter (as defined in  **[nws\_search(1)](/nws_search/1.md)** ) to be added in the search of the right series: usefull if you have multiple series amongs the hosts.  *filter* has to be between (). Hint you may need to quote the filter to prevent shell expansion.

**host** *\[host...\]*

these are the lists of hosts for which you are interested in getting the measurements. For some resource (say latencyTcp) you need at least 2 hosts. *host* can be of the form hostname:port in case the sensors are running on non standard ports.

## EXAMPLES

Let's assume there is  **[nws\_nameserver(1)](/nws_nameserver/1.md)** running on machine A and that there are 2  **[nws\_sensor(1)](/nws_sensor/1.md)** running on machine A and B.

nws\_extract -N A avail B

will extract data for availableCPU for machine B and

nws\_extract -N A avail -f time,measurement B

will do the same but prints out only the timestamps and the measurements (no forecasts).

If you have multiple cliques running between A and B, say with different experiment size (one with the default 64 the other wiht 512) you can query for all the bandwidth experiments

nws\_extract -N A band A B

or for only the 512 data

nws\_extract -N A band "(size=512)" A B

## BUGS

Bugs list is at  http://nws.cs.ucsb.edu. ⟨http://nws.cs.ucsb.edu⟩

## AUTHOR

NWS is an original idea of Rich Wolski Rich Wolski (rich@cs.ucsb.edu) who came up with the original **nws\_memory.**

Neil Spring, Jim Hayes (jhayes@cs.ucsd.edu) and Martin Swany maintained and enhanced it.

Graziano Obertelli (graziano@cs.ucsb.edu) currently maintains NWS and wrote this man page.

## SEE ALSO

**[nws\_sensor(1)](/nws_sensor/1.md),** **[nws\_search(1)](/nws_search/1.md),** **[nws\_nameserver(1)](/nws_nameserver/1.md),** **[nws\_extract(1)](/nws_extract/1.md)** **halt\_activity(1)** **start\_activity(1)**
