gen sn by server