add shared memory support and using JSON output format

put stat counter into SHM in order to avoid confusion counts between different workers