/**
|
* 查看与移出key的工具
|
*/
|
#include <assert.h>
|
#include "net_mod_server_socket_wrapper.h"
|
//#include "net_mod_socket_wrapper.h"
|
//#include "bus_server_socket_wrapper.h"
|
|
#include "shm_mm_wrapper.h"
|
#include "usg_common.h"
|
#include <getopt.h>
|
//#include "logger_factory.h"
|
|
|
static void usage(const char *name) {
|
printf("Usage: %s { list }\n", name);
|
|
}
|
|
|
void list () {
|
ShmQueueStMap * shmQueueStMap = shm_mm_attach<ShmQueueStMap>(SHM_QUEUE_ST_KEY);
|
|
for(auto it = shmQueueStMap->begin(); it != shmQueueStMap->end(); ++it ) {
|
printf("%10d \t %10d\n", it->first, it->second.status);
|
|
}
|
}
|
|
|
|
int main(int argc, char *argv[]) {
|
shm_mm_wrapper_init(512);
|
|
int key;
|
int i;
|
if(argc < 2) {
|
usage(argv[0]);
|
return 1;
|
}
|
|
if(strcmp(argv[1], "list") == 0) {
|
list();
|
} else {
|
usage(argv[0]);
|
}
|
|
|
shm_mm_wrapper_destroy();
|
|
|
|
}
|