---
name: "lam_rfstate"
section: "2"
platform: "linux"
package: "lam2-dev"
version: "6.3.2-3"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/lam_rfstate"
---

# lam\_rfstate(2)

Report status of remote LAM file descriptors.

## NAME

lam\_rfstate - Report status of remote LAM file descriptors.

## SYNOPSIS

\#include \<freq.h\>

int lam\_rfstate(int node, struct fstate \*table, int maxsize);

## DESCRIPTION

The remote function *lam\_rfstate()* accesses a remote LAM file daemon and returns status information on all file descriptors.

The arguments to *lam\_rfstate()* are: *node*, the target node identifier; *table*, an array of structures where status information will be stored; and *maxsize*, the number of elements in that array.

The file status structure is defined in \<freq.h\>.

```
struct fstate {
	int	fs_tfd
	int	fs_tflags
	int	fs_flow
	int	fs_src_node
	int	fs_src_event
	int	fs_ncubix
	int	fs_nheard
	int	fs_req
	char	fs_name[24]
};
```

- fs\_tfd

  LAM file handle

- fs\_tflags

  LAM, POSIX, and internal filed flags

- fs\_flow

  total amount of data transferred to date

- fs\_src\_node

  last client's nodeid

- fs\_src\_event

  last client's reply event (negative PID)

- fs\_name

  trailing 24 bytes of file name

The *fs\_tflags* field contains the original POSIX and LAM open flags as well as extra status flags added by the file daemon. See [open(2)](/open/2.md) for information on POSIX open flags. See [lam\_rfposix(2)](/lam_rfposix/2.md) for information on LAM open flags. The LAM status flags are defined in \<freq.h\>.

- FACTIVE

  The LAM file descriptor has an associated open POSIX file descriptor.

- FLOCK

  The descriptor is permanently FACTIVE.

## RETURN VALUE

Upon successful completion, the number of open file descriptors mananged by the remote file daemon is returned. The return value may be more or less than *maxsize*. If an error occurred, -1 is returned and the global variable *errno* is set to indicate the type of error.

## SEE ALSO

[fstate(1)](/fstate/1.md), [lam\_rfposix(2)](/lam_rfposix/2.md)
