# Managing Apps on the Shop Floor

> Use page views, open connections, and metrics to roll out updates safely, support stations, and track what's in use.

URL: https://www.trakhound.com/docs/trakhound-framework/managing-apps

In a plant, Apps run on operator terminals, andon displays, kiosks, and office PCs, often all day, often unattended, and always while production is running. An Instance knows every page that's open, which version it runs, whether someone is using it, and how each App is used over time. This guide shows how IT and engineering teams use that to roll out changes safely, support stations, and keep track of what's in use.

Diagram: Four stations have App pages open. The Line 1 terminal and the Line 2 andon display run the current version; the Line 1 terminal is being edited and the display is idle. The quality lab PC and the shipping kiosk run the retired version; the lab PC has unsaved changes and the kiosk is idle. The administrator can identify, notify, reload, or message each one, and reloads only the idle stations on the retired version.

The examples use the admin UI pages described in [Apps > Page Views, Connections and Metrics](https://www.trakhound.com/docs/trakhound-framework/apps#monitoring).

## 1. Know What's in Use

Most plants accumulate tools that nobody is sure are still used. The App list under **Explorer > Apps** answers that directly:

- **Views** and **Last Viewed** show which Apps are used and which haven't been opened in months, so unused ones can be retired with confidence.
- **Diagnostics > Metrics > Apps** shows each page's views and time on page, so you can see which screens operators actually rely on before changing them.
- The **Access Log** shows which stations use each App. Search it by hostname (ex. `line3`) to see what a station does across a shift.

> Give shop floor PCs and displays meaningful hostnames in DNS (ex. `line3-terminal`, `press4-andon`). The Instance looks up each client's hostname, so connections and the Access Log then say which station is which, instead of only an IP address.

## 2. Match a Screen to a Station

When an operator calls about a screen, or you need to find a particular display:

1. Open **Diagnostics > Connections > App Pages** and click **Identify** on the App (or a connection).
2. Each page shows its 4-character Code, App, and client in the corner for 5 seconds. Ask the operator to read the code, or walk the line.
3. Find that Code in the list to see the station's address, page, version, and status, and act on just that connection.

## 3. Roll Out Updates Without Stopping Production

Installing a new App version never refreshes a page out from under an operator. Open pages keep running the old version and show an update banner, then reload when the operator chooses, changes pages, or has been idle for a few minutes. For a planned rollout:

1. Try the version on a test Instance first (see [Development, Test & Production](https://www.trakhound.com/docs/trakhound-framework/environments)).
2. Install it in production during the shift. New visitors get it immediately; open pages show the banner.
3. Watch **App Pages**: connections still on the old version are marked **Retired**.
4. **Reload** the ones that are **Idle** or in the **Background**, such as unattended displays and kiosks. They're safe to reload: nobody is using them and nothing is unsaved.
5. **Notify** the ones that are **Editing** or have **Unsaved** changes, so they update after the operator finishes, or wait for a shift change.
6. If there's a problem, **Revert** the Package to the previous version (**Packages > Installed**), then bring open pages back the same way.

> Wall-mounted displays and dashboards that nobody touches stay **Idle**, so they can be updated right away without waiting for anyone, and confirmed on the list.

## 4. Communicate with the Floor

**Send Message** puts a notice at the top of open pages, as Information or a Warning, closed by the user or after a set time. Send it to every page of an App or a single station, for example:

- A warning before planned maintenance or a server restart: *Line 3 will be down for maintenance at 3:00 PM.*
- A notice that a new version with changed screens has been installed.
- A request to a single station to save its work before you reload it.

Messages aren't stored, so only pages open when it's sent see it.

## 5. Support a Station

When an operator reports that a screen is wrong or showing an error:

1. **Identify** the screen (step 2) to find its connection: which App, page, and version it runs.
2. If it's on a retired version, **Reload** it once it's safe.
3. If the page showed an error, it includes a **Request ID**. Search **Diagnostics > Logs** for it to find the exception, without needing the operator to copy a stack trace.
4. Search the **Access Log** for the station's Code or hostname to see what it was doing before the problem.

If a page loses its connection, for example while the Instance restarts, it shows a reconnecting message and retries on its own, so stations recover without someone walking out to them.

## 6. Audit and Change Control

- **What ran where:** the Access Log keeps a dated record of every page view, by station, for as long as log history is kept (30 days by default, then archived).
- **What version each station ran:** connections show the exact version each open page is running, and every version stays installed until it's removed.
- **What changed:** Apps are versioned Packages, so changes go through the same review, test Instance, and [Deployments](https://www.trakhound.com/docs/trakhound-framework/configuration#deployments) as everything else.
- **Who can see which pages:** [security profiles](https://www.trakhound.com/docs/trakhound-framework/security) control access to each App page, with sign-in through your identity provider.

> The Access Log records client addresses, hostnames, and browsers. Review it against your organization's policies for monitoring workstations, and set log retention to match.

## 7. Feed Plant and IT Monitoring

Poll the System API from your monitoring system, MES, or an IT dashboard to track App usage alongside everything else. Create an API key for it, and grant its role only `read` on `system:apps`:

```
curl -H "X-API-Key: $TRAKHOUND_API_KEY" http://trakhound01:8472/_apps/metrics
curl -H "X-API-Key: $TRAKHOUND_API_KEY" http://trakhound01:8472/_apps/metrics/connections
```

- Alert when a critical display (ex. an andon board) has no open connection.
- Report how many stations are still on a retired version after a rollout.
- Track usage of each App over time to plan training or retire tools.

Instance health is available at `/_health` for the same systems, and **Instance > Monitor** shows each App's CPU when **Measure CPU Usage** is on. See [Other Languages](https://www.trakhound.com/docs/trakhound-framework/clients) for calling the System API from scripts.
