---
title: "__machineName"
description: "JMeter __machineName function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values."
url: https://docs.jmeter.ai/functions/machinename/
lastUpdated: 2026-10-01
source: docs.jmeter.ai
---

# __machineName

*Also documented in context in the [full Functions and Variables reference](/user-manual/functions/#__machineName).*

The machineName function returns the local host name. This uses the Java method `InetAddress.getLocalHost()` and passes it to `getHostName()`

| Name | Required | Description |
| --- | --- | --- |
| Variable Name | No | A reference name for reusing the value                 computed by this function. |

Examples:

```bash
\${__machineName()}
```

will return the host name of the machine

```bash
\${__machineName}
```

will return the host name of the machine

## Related

- [Functions and Variables Guide](/topics/functions-and-variables/)
- [Regex Extractor Builder](/tools/regex-tester/)
- [Full Functions Reference](/user-manual/functions/)
- [Component Reference](/user-manual/component-reference/)
