HAProxy Enterprise Documentation 2.3r1

show map

List map files or list the entries in a map file.

Description

Use the show map command to list map files or to display the contents of a particular map file. The contents of the map may be different from what's on disk if you've used the Runtime API to add or delete entries in memory.

Examples

In the example below, we use show map with no arguments to list the map files registered with the load balancer. The output shows the path to the map files and their numeric IDs:

$ echo "show map" | socat stdio tcp4-connect:127.0.0.1:9999
# id (file) description
0 (/etc/hapee-2.3/routes.map) pattern loaded from file '/etc/hapee-2.3/routes.map' used by map at file '/etc/hapee-2.3/hapee-lb.cfg' line 61

In this case, there is one map file defined at /etc/hapee-2.3/routes.map and its ID is 0.

  1. Display the contents of the /etc/hapee-2.3/routes.map map file by passing its path to show map:

    $ echo "show map /etc/hapee-2.3/routes.map" | socat stdio tcp4-connect:127.0.0.1:9999
    0x563bbeeee160 /cart/ cart_api
    0x563bbeeee1a0 /reviews/ reviews_api
    0x563bbeeee200 /products/ products_api
    0x563bbeeee280 /login/ login_api
    0x563bbeeee300 /chat/ chat_servers

    You can also pass it the map's ID prefixed with a hash sign:

    $ echo "show map #0" | socat stdio tcp4-connect:127.0.0.1:9999
    0x563bbeeee160 /cart/ cart_api
    0x563bbeeee1a0 /reviews/ reviews_api
    0x563bbeeee200 /products/ products_api
    0x563bbeeee280 /login/ login_api
    0x563bbeeee300 /chat/ chat_servers

See also


Next up

Lua