show map
Use show map
to list map files defined in the configuration.
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" | \
sudo socat stdio unix-connect:/var/run/hapee-2.2/hapee-lb.sock
# id (file) description
0 (/etc/hapee-2.2/routes.map) pattern loaded from file '/etc/hapee-2.2/routes.map' used by map at file '/etc/hapee-2.2/hapee-lb.cfg' line 61
In this case, there is one map file defined at /etc/hapee-2.2/routes.map
and its ID is 0.
-
Display the contents of the
/etc/hapee-2.2/routes.map
map file by passing its path toshow map
:$ echo "show map /etc/hapee-2.2/routes.map" | \ sudo socat stdio unix-connect:/var/run/hapee-2.2/hapee-lb.sock
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" | \ sudo socat stdio unix-connect:/var/run/hapee-2.2/hapee-lb.sock
0x563bbeeee160 /cart/ cart_api 0x563bbeeee1a0 /reviews/ reviews_api 0x563bbeeee200 /products/ products_api 0x563bbeeee280 /login/ login_api 0x563bbeeee300 /chat/ chat_servers
See also
Next up
show peers